1 страниц (7 вхождений)
Can't find variables - Calculated variable not found - Сообщения
#1 Опубликовано: 08.01.2021 10:03:30
I am encounter another minor problem, cant figure out why the calculated cannot be shown two times in the calculation sheet

See attached calculation
WT Calculation.sm (62 КиБ) скачан 31 раз(а).
See attached calculation
WT Calculation.sm (62 КиБ) скачан 31 раз(а).
#2 Опубликовано: 08.01.2021 10:58:58
#3 Опубликовано: 08.01.2021 11:03:35
Is this a common / default practise to follow each time using Findroots? why is other formula dont required the function eva? I am starting to get very confuse
#4 Опубликовано: 08.01.2021 11:07:53
#5 Опубликовано: 08.01.2021 11:22:23
#6 Опубликовано: 08.01.2021 11:22:32
The problem is due to the embedded assignment in FindRoot.
When t_thick is defined, the solution command is just stored but not executed.
It is first time executed, when t_thick is displayed. At that point, t.t gets defined by internal assignment.
At the second attempt to display t.thick, this fails because FindRoot needs undefined variables.
using eval() enforces immediate execution of FindRoot and assigns the result to t.thick.
Subsequent references to t.thick just display the stored value instead of executing FindRoot again.

When t_thick is defined, the solution command is just stored but not executed.
It is first time executed, when t_thick is displayed. At that point, t.t gets defined by internal assignment.
At the second attempt to display t.thick, this fails because FindRoot needs undefined variables.
using eval() enforces immediate execution of FindRoot and assigns the result to t.thick.
Subsequent references to t.thick just display the stored value instead of executing FindRoot again.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#7 Опубликовано: 08.01.2021 12:01:51
Thank you to all your guidance and advice. Learned another trick today.!!
1 страниц (7 вхождений)
-
Новые сообщения
-
Нет новых сообщений