Rank: Newbie
Groups: Registered
Joined: 07/11/2011(UTC) Posts: 3 Location: Denmark
|
I was making a calculation of E.pot = m*h*g, m= 65kg h=3,5m g=9,82m/s^2 if I write 'h*m*g=' I get 2234,05J, but if I write 'E.pot:=m*g*h E.pot=' I get 2405,9J edit: smath file attached Edited by user 19 November 2012 14:46:40(UTC)
| Reason: smath file attached
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello,
I think you've made some mistake here. Please attach the problematic SMath file to the post.
Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,648 Location: Italy Was thanked: 1331 time(s) in 876 post(s)
|
Originally Posted by: jenspraest I was making a calculation of E.pot = m*h*g, m= 65kg h=3,5m g=9,82m/s^2 if I write 'h*m*g=' I get 2234,05J, but if I write 'E.pot:=m*g*h E.pot=' I get 2405,9J
edit: smath file attached Hi jenspraest, It's not a bug, just a behavior... Please hold the mouse on the E.pot definition... you can see that SMath assign all available variables, so when you make a call to E.pot only the h value will be replaced; to have the "right" behavior you need to place the definition before the variable assignments or to create a function E.pot(m,h)regards, w3b5urf3r File Attachment(s): Davide Carpi attached the following image(s): |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/11/2010(UTC) Posts: 37 Location: Germany
Was thanked: 1 time(s) in 1 post(s)
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.