Can't find variables

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

#1 Objavljeno: 8. 1. 2021. 10:03:30
Tow Wai Lim

Tow Wai Lim

0 svidjanja u 42 postova.

Grupa: 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,69 KiB) preuzeto 1304 put(ova).
#2 Objavljeno: 8. 1. 2021. 10:58:58
Fridel Selitsky

Fridel Selitsky

520 svidjanja u 451 postova.

Grupa: User

Use the function eval
WT Calculation1.sm (63,7 KiB) preuzeto 1275 put(ova).
#3 Objavljeno: 8. 1. 2021. 11:03:35
Tow Wai Lim

Tow Wai Lim

0 svidjanja u 42 postova.

Grupa: 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 Objavljeno: 8. 1. 2021. 11:07:53
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

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

CantFindVariable.PNG
#5 Objavljeno: 8. 1. 2021. 11:22:23
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

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

findroot_bug.sm (18,75 KiB) preuzeto 1221 put(ova).

findroot_bug.png
#6 Objavljeno: 8. 1. 2021. 11:22:32
Martin Kraska

Martin Kraska

1.369 svidjanja u 2.283 postova.

Grupa: 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
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#7 Objavljeno: 8. 1. 2021. 12:01:51
Tow Wai Lim

Tow Wai Lim

0 svidjanja u 42 postova.

Grupa: User

Thank you to all your guidance and advice. Learned another trick today.!!
  • Novi postovi
  • Nema novih postova