noob question

noob question - How to get intermediate formula - Messaggi

#1 Pubblicato: 23/10/2021 07:23:31
DeepButi

DeepButi

0 apprezzamenti in 7 post.

Gruppo: 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 Pubblicato: 23/10/2021 09:04:36
overlord

overlord

600 apprezzamenti in 1.381 post.

Gruppo: 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 Pubblicato: 23/10/2021 11:11:27
DeepButi

DeepButi

0 apprezzamenti in 7 post.

Gruppo: 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 Pubblicato: 23/10/2021 13:25:33
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: User

Wrote

Just my decimal values get displayed as fractions


Evaluate Numeric.
#5 Pubblicato: 23/10/2021 15:39:21
overlord

overlord

600 apprezzamenti in 1.381 post.

Gruppo: 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 Pubblicato: 23/10/2021 16:29:43
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Hi. This is another way.

intermediate_results.sm (14,4 KiB) scaricato 1240 volta(e).

Imagen1.png

Best regards.
Alvaro.
1 utenti hanno apprezzato questo post
sergio 24/10/2021 16:26:00
#7 Pubblicato: 23/10/2021 17:59:30
DeepButi

DeepButi

0 apprezzamenti in 7 post.

Gruppo: User

Wrote

Hi. This is another way.

intermediate_results.sm (14,4 KiB) scaricato 1240 volta(e).

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 Pubblicato: 24/10/2021 16:00:36
DeepButi

DeepButi

0 apprezzamenti in 7 post.

Gruppo: 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 Pubblicato: 24/10/2021 22:10:44
overlord

overlord

600 apprezzamenti in 1.381 post.

Gruppo: 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,16 KiB) scaricato 1220 volta(e).

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 Pubblicato: 25/10/2021 07:36:36
sergio

sergio

127 apprezzamenti in 342 post.

Gruppo: 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 utenti hanno apprezzato questo post
Alvaro 25/10/2021 13:22:00
#11 Pubblicato: 25/10/2021 13:29:52
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

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

Using

img0.png

You can get

Hold.sm (9,78 KiB) scaricato 1222 volta(e).

img1.png

or

Hold_v2.sm (9,06 KiB) scaricato 1221 volta(e).

img2.png

Best regards.
Alvaro.
1 utenti hanno apprezzato questo post
sergio 25/10/2021 14:18:00
#12 Pubblicato: 25/10/2021 18:31:25
DeepButi

DeepButi

0 apprezzamenti in 7 post.

Gruppo: 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 Pubblicato: 25/10/2021 21:06:10
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Wrote

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



Hi. Insert eval( ) in UnHold

img0.png

Best regards.
Alvaro.
#14 Pubblicato: 26/10/2021 05:48:01
DeepButi

DeepButi

0 apprezzamenti in 7 post.

Gruppo: 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 Pubblicato: 26/10/2021 12:21:13
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: 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 Pubblicato: 26/10/2021 14:01:06
DeepButi

DeepButi

0 apprezzamenti in 7 post.

Gruppo: 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 Pubblicato: 27/10/2021 02:25:12
John Heidenreich

John Heidenreich

5 apprezzamenti in 67 post.

Gruppo: 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 Pubblicato: 27/10/2021 18:53:09
overlord

overlord

600 apprezzamenti in 1.381 post.

Gruppo: 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 Pubblicato: 10/07/2022 09:45:20
Nicolae Olaru

Nicolae Olaru

1 apprezzamenti in 115 post.

Gruppo: 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 Pubblicato: 11/07/2022 09:47:13
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: 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,46 KiB) scaricato 1241 volta(e).

  • Nuovi post
  • Nessun nuovo post