Calculation error with vector and for loop

Calculation error with vector and for loop - Messaggi

#1 Pubblicato: 07/02/2025 01:21:47
Chia

Chia

0 apprezzamenti in 1 post.

Gruppo: User

Hello, I'm having a problem with this file.

The value of Mab(x) within the Mab vector is different from the same Mab(x) outside the vector.
What could be the reason? I tried both manually creating the vector and with "for" loop iteration.

I've attached an screenshot and the .sm file.

Thanks!

calculation error smath mab.sm (194,34 KiB) scaricato 1821 volta(e).

Captura de pantalla 2025-02-06 141701.png
#2 Pubblicato: 08/02/2025 12:05:59
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Hola Julián. Hovering over an expression shows the result that SMath stores. So, this is the value of Ma, which depends on Re, which is defined later.

Ma.png


So this is what is stored in Ma(x).

Mab(x).png

Apparently there would be some kind of recurrence since Ma(x) depends on Ma, which depends on Re and Re depends on Ray and ... well, I don't see the problem with recurrence, but SMath evidently has some kind of problem, which I don't know what it could be, but I guess that there is some "unstable" recurrence there.

If you define Ma after Re, the problems would be solved:

Ma2.png

Mab(x)2.png

end.png

calculation error smath mab 2.sm (192,78 KiB) scaricato 1829 volta(e).

Best regards.
Alvaro.
  • Nuovi post
  • Nessun nuovo post