Rank: Newbie
Groups: Registered
Joined: 23/10/2021(UTC) Posts: 7 Location: Sant Cugat
|
Hi, new to SMath and trying to figure how to get the formula with the variable values before the final result. I want to write a: = 3 b: = 4 a + b click = and get a + b = 3 + 4 = 7 Is this possible? Thks
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: DeepButi Hi, new to SMath and trying to figure how to get the formula with the variable values before the final result. I want to write a: = 3 b: = 4 a + b click = and get a + b = 3 + 4 = 7 Is this possible? Thks Not how you wanted in single line but possible.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 23/10/2021(UTC) Posts: 7 Location: Sant Cugat
|
Originally Posted by: overlord Originally Posted by: DeepButi Hi, new to SMath and trying to figure how to get the formula with the variable values before the final result. I want to write a: = 3 b: = 4 a + b click = and get a + b = 3 + 4 = 7 Is this possible? Thks Not how you wanted in single line but possible. Thks a lot, it will do. Just my decimal values get displayed as fractions a := 3.5 b := 4.5 a + b = 7/2 + 9/2 I can live with that
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: DeepButi Just my decimal values get displayed as fractions Evaluate Numeric.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: DeepButi Thks a lot, it will do. Just my decimal values get displayed as fractions a := 3.5 b := 4.5 a + b = 7/2 + 9/2 You can write variables inside simple functions with this method. This is not a practical way to write variables inside complex functions. And it does not look good too. Yet it is better than nothing. You can write a + b with Ctrl+Shift+K.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
|
1 user thanked Razonar for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 23/10/2021(UTC) Posts: 7 Location: Sant Cugat
|
Originally Posted by: Razonar That looks exactly as I was looking for ... going to study it. Thks a lot, it will save me quite a bit of time.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 23/10/2021(UTC) Posts: 7 Location: Sant Cugat
|
Hi Razonar, it works perfectly well for initial formulas, but cannot find any way to use a previous result on a new one. Cannot put all values in a single vals, the simbolic substitution will show in the second formula the formula (not the value) of the calculated value (ee). Cannot either reuse names. Any idea?
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: DeepButi Any idea? I have an idea, if someone has better you can use it. Rewrite expressions and hide them inside areas. Configure page setup with "no areas". When you save as pdf or print, it will show as continuous. MySum.sm (9kb) downloaded 11 time(s).But here is a humble suggestion. SMath was not coded with intent to show intermediate results. You are going to struggle very much with this approach. Regards
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/12/2011(UTC) Posts: 319 Location: italy Was thanked: 109 time(s) in 93 post(s)
|
I point out that in a previous post DeepButi used the function Clear("all" ) that despite not giving error does not have a feedback in SM: does not delete any variable. sergio
|
1 user thanked PompelmoTell for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Hi. This is another way. The feature request actually is here. Using You can get Hold.sm (10kb) downloaded 10 time(s).or Hold_v2.sm (10kb) downloaded 10 time(s).Best regards. Alvaro. Edited by user 25 October 2021 19:42:55(UTC)
| Reason: Not specified
|
1 user thanked Razonar for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 23/10/2021(UTC) Posts: 7 Location: Sant Cugat
|
Too easy to be true Final step uses fractions to substitute ... Use a:=1.2 in your example and you will see. Actual formulas are for sure more complex so the data display is really confusing.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: DeepButi ... Use a:=1.2 in your example and you will see.
Hi. Insert eval( ) in UnHold Best regards. Alvaro.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 23/10/2021(UTC) Posts: 7 Location: Sant Cugat
|
Hi. Insert eval( ) in UnHold
Best regards. Alvaro. You are a genious. Thks! Just trying to figure out how to avoid too many decimals now Decimal places set to 4 everywhere
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: DeepButi ... Just trying to figure out how to avoid too many decimals now Decimal places set to 4 everywhere Hi. Thanks! ... but ... not ... but thanks. That behavior seems to be a bug or an oversight: set the decimal places in the output of an expression with None Optimization. In the meantime, this could be a workaround, but could be dangerous, because change the stored value. Actually I don't really recommend it. Best regards. Alvaro.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 23/10/2021(UTC) Posts: 7 Location: Sant Cugat
|
Originally Posted by: Razonar
Hi. Thanks! ... but ... not ... but thanks. That behavior seems to be a bug or an oversight: set the decimal places in the output of an expression with None Optimization.
In the meantime, this could be a workaround, but could be dangerous, because change the stored value. Actually I don't really recommend it.
Best regards. Alvaro.
Ok, ok. Really it's a BIG THANKS. :round(eval(... works perfectly well :eval(round(... didn't.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 26/09/2021(UTC) Posts: 66 Location: Adelaide Was thanked: 5 time(s) in 3 post(s)
|
Originally Posted by: DeepButi Originally Posted by: Razonar
Hi. Thanks! ... but ... not ... but thanks. That behavior seems to be a bug or an oversight: set the decimal places in the output of an expression with None Optimization.
In the meantime, this could be a workaround, but could be dangerous, because change the stored value. Actually I don't really recommend it.
Best regards. Alvaro.
Ok, ok. Really it's a BIG THANKS. :round(eval(... works perfectly well :eval(round(... didn't. Another way...
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: Jean Giraud Hello, John I found no way to recover the symbolic Quaternion ? Maple is not cracked for this demand ... Now, scratch your head. Take care ... Jean. Not related with OP's requests.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 21/11/2017(UTC) Posts: 114 Location: Olt county Was thanked: 1 time(s) in 1 post(s)
|
Originally Posted by: PompelmoTell ... used thefunction Clear ... Regarding the "Clear (arg)" function, my question is: is it possible to write an analytic function in Smath that has the same purpose ?! PS - If so, maybe the moderator should separate a new topic. I have not studied this issue very well. Many apologies.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: ola_nicolas Regarding the "Clear (▪,▪,▪ ...)" function, my question is: is it possible to write an analytic function in Smath that has the same purpose ?! That's what Clear(,) does ... Maybe I don't understand analytical ? Cheers ... Jean. Maths Clear.sm (17kb) downloaded 10 time(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.