Calculation error with vector and for loop

Calculation error with vector and for loop - 消息

#1 已发布: 2025/2/7 01:21:47
Chia

Chia

0个赞,共1个帖子。

组: 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)已下载 1836 次。

Captura de pantalla 2025-02-06 141701.png
#2 已发布: 2025/2/8 12:05:59
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: 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)已下载 1846 次。

Best regards.
Alvaro.
  • 有新帖
  • 无新帖