noob question

noob question - How to get intermediate formula - Messages

#1 Posted: 10/23/2021 7:23:31 AM
DeepButi

DeepButi

0 likes in 7 posts.

Group: User

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
#2 Posted: 10/23/2021 9:04:36 AM
overlord

overlord

549 likes in 1332 posts.

Group: Moderator

Wrote

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.

2021-10-23_15-03.png
#3 Posted: 10/23/2021 11:11:27 AM
DeepButi

DeepButi

0 likes in 7 posts.

Group: User

Wrote

Wrote

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.

2021-10-23_15-03.png



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


#4 Posted: 10/23/2021 1:25:33 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Just my decimal values get displayed as fractions


Evaluate Numeric.
#5 Posted: 10/23/2021 3:39:21 PM
overlord

overlord

549 likes in 1332 posts.

Group: Moderator

Wrote

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.

2021-10-23_21-20.png
#6 Posted: 10/23/2021 4:29:43 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. This is another way.

intermediate_results.sm (14 KiB) downloaded 42 time(s).

Imagen1.png

Best regards.
Alvaro.
1 users liked this post
sergio 10/24/2021 4:26:00 PM
#7 Posted: 10/23/2021 5:59:30 PM
DeepButi

DeepButi

0 likes in 7 posts.

Group: User

Wrote

Hi. This is another way.

intermediate_results.sm (14 KiB) downloaded 42 time(s).

Imagen1.png

Best regards.
Alvaro.



That looks exactly as I was looking for ... going to study it. Thks a lot, it will save me quite a bit of time.
#8 Posted: 10/24/2021 4:00:36 PM
DeepButi

DeepButi

0 likes in 7 posts.

Group: User

Hi Razonar,
it works perfectly well for initial formulas, but cannot find any way to use a previous result on a new one.

Sin titulo.jpg

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?
#9 Posted: 10/24/2021 10:10:44 PM
overlord

overlord

549 likes in 1332 posts.

Group: Moderator

Wrote

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 (8 KiB) downloaded 24 time(s).

MySum.png

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
#10 Posted: 10/25/2021 7:36:36 AM
sergio

sergio

115 likes in 329 posts.

Group: User

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 users liked this post
Alvaro Diaz Falconi 10/25/2021 1:22:00 PM
#11 Posted: 10/25/2021 1:29:52 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. This is another way. The feature request actually is here.

Using

img0.png

You can get

Hold.sm (9 KiB) downloaded 24 time(s).

img1.png

or

Hold_v2.sm (9 KiB) downloaded 26 time(s).

img2.png

Best regards.
Alvaro.
1 users liked this post
sergio 10/25/2021 2:18:00 PM
#12 Posted: 10/25/2021 6:31:25 PM
DeepButi

DeepButi

0 likes in 7 posts.

Group: User

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.

Sin titulo.jpg
#13 Posted: 10/25/2021 9:06:10 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

... Use a:=1.2 in your example and you will see.



Hi. Insert eval( ) in UnHold

img0.png

Best regards.
Alvaro.
#14 Posted: 10/26/2021 5:48:01 AM
DeepButi

DeepButi

0 likes in 7 posts.

Group: User

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

Sin titulo.jpg



#15 Posted: 10/26/2021 12:21:13 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

...
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.

img.png

Best regards.
Alvaro.
#16 Posted: 10/26/2021 2:01:06 PM
DeepButi

DeepButi

0 likes in 7 posts.

Group: User

Wrote



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.

#17 Posted: 10/27/2021 2:25:12 AM
John Heidenreich

John Heidenreich

5 likes in 67 posts.

Group: User

Wrote

Wrote



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...
Capture27.JPG
#18 Posted: 10/27/2021 6:53:09 PM
overlord

overlord

549 likes in 1332 posts.

Group: Moderator

Wrote

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.
#19 Posted: 7/10/2022 9:45:20 AM
Nicolae Olaru

Nicolae Olaru

1 likes in 115 posts.

Group: User

Wrote

... 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.
#20 Posted: 7/11/2022 9:47:13 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

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 (16 KiB) downloaded 26 time(s).

  • New Posts New Posts
  • No New Posts No New Posts