Can't find variables

Can't find variables - Calculated variable not found - Messages

#1 Posted: 4 years ago
Tow Wai Lim

Tow Wai Lim

0 likes in 42 posts.

Group: User

I am encounter another minor problem, cant figure out why the calculated cannot be shown two times in the calculation sheet

Untitled.png

See attached calculation
WT Calculation.sm (62 KiB) downloaded 96 time(s).
#2 Posted: 4 years ago
Fridel Selitsky

Fridel Selitsky

520 likes in 451 posts.

Group: User

Use the function eval
WT Calculation1.sm (63 KiB) downloaded 98 time(s).
#3 Posted: 4 years ago
Tow Wai Lim

Tow Wai Lim

0 likes in 42 posts.

Group: User

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 Posted: 4 years ago
Jean Giraud

Jean Giraud

983 likes in 6,866 posts.

Group: User

BTW, ... either <, > rarely exist in maths.
Define completely as shown.

CantFindVariable.PNG
#5 Posted: 4 years ago
overlord

overlord

558 likes in 1,335 posts.

Group: Moderator

Maybe there is a bug.
Is this same with everyone?

findroot_bug.sm (18 KiB) downloaded 93 time(s).

findroot_bug.png
#6 Posted: 4 years ago
Martin Kraska

Martin Kraska

1,230 likes in 2,156 posts.

Group: Moderator

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.

Blatt7.png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#7 Posted: 4 years ago
Tow Wai Lim

Tow Wai Lim

0 likes in 42 posts.

Group: User

Thank you to all your guidance and advice. Learned another trick today.!!
  • New Posts New Posts
  • No New Posts No New Posts