Calculation error with vector and for loop

Calculation error with vector and for loop - Сообщения

#1 Опубликовано: 07.02.2025 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 КиБ) скачан 26 раз(а).

Captura de pantalla 2025-02-06 141701.png
#2 Опубликовано: 08.02.2025 12:05:59
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: 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 КиБ) скачан 29 раз(а).

Best regards.
Alvaro.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений