Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


2 Pages12>
Options
Go to last post Go to first unread
Offline DeepButi  
#1 Posted : 23 October 2021 13:23:31(UTC)
DeepButi

Rank: Newbie

Groups: Registered
Joined: 23/10/2021(UTC)
Posts: 7
Spain
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

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline overlord  
#2 Posted : 23 October 2021 15:04:36(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,124
Turkey

Was thanked: 506 time(s) in 337 post(s)
Originally Posted by: DeepButi Go to Quoted Post
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
Offline DeepButi  
#3 Posted : 23 October 2021 17:11:27(UTC)
DeepButi

Rank: Newbie

Groups: Registered
Joined: 23/10/2021(UTC)
Posts: 7
Spain
Location: Sant Cugat

Originally Posted by: overlord Go to Quoted Post
Originally Posted by: DeepButi Go to Quoted Post
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


Blush Blush I can live with that Blush Blush


Offline Jean Giraud  
#4 Posted : 23 October 2021 19:25:33(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: DeepButi Go to Quoted Post
Just my decimal values get displayed as fractions

Evaluate Numeric.
Offline overlord  
#5 Posted : 23 October 2021 21:39:21(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,124
Turkey

Was thanked: 506 time(s) in 337 post(s)
Originally Posted by: DeepButi Go to Quoted Post
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
Offline Razonar  
#6 Posted : 23 October 2021 22:29:43(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi. This is another way.

intermediate_results.sm (15kb) downloaded 25 time(s).

Imagen1.png

Best regards.
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 24/10/2021(UTC)
Offline DeepButi  
#7 Posted : 23 October 2021 23:59:30(UTC)
DeepButi

Rank: Newbie

Groups: Registered
Joined: 23/10/2021(UTC)
Posts: 7
Spain
Location: Sant Cugat

Originally Posted by: Razonar Go to Quoted Post
Hi. This is another way.

intermediate_results.sm (15kb) downloaded 25 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.
Offline DeepButi  
#8 Posted : 24 October 2021 22:00:36(UTC)
DeepButi

Rank: Newbie

Groups: Registered
Joined: 23/10/2021(UTC)
Posts: 7
Spain
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.

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?
Offline overlord  
#9 Posted : 25 October 2021 04:10:44(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,124
Turkey

Was thanked: 506 time(s) in 337 post(s)
Originally Posted by: DeepButi Go to Quoted Post
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).

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
Offline PompelmoTell  
#10 Posted : 25 October 2021 13:36:36(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 318
Man
Italy
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
thanks 1 user thanked PompelmoTell for this useful post.
on 25/10/2021(UTC)
Offline Razonar  
#11 Posted : 25 October 2021 19:29:52(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi. This is another way. The feature request actually is here.

Using

img0.png

You can get

Hold.sm (10kb) downloaded 10 time(s).

img1.png

or

Hold_v2.sm (10kb) downloaded 10 time(s).

img2.png

Best regards.
Alvaro.

Edited by user 25 October 2021 19:42:55(UTC)  | Reason: Not specified

thanks 1 user thanked Razonar for this useful post.
on 25/10/2021(UTC)
Offline DeepButi  
#12 Posted : 26 October 2021 00:31:25(UTC)
DeepButi

Rank: Newbie

Groups: Registered
Joined: 23/10/2021(UTC)
Posts: 7
Spain
Location: Sant Cugat

Too easy to be true Dry 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
Offline Razonar  
#13 Posted : 26 October 2021 03:06:10(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: DeepButi Go to Quoted Post
... Use a:=1.2 in your example and you will see.


Hi. Insert eval( ) in UnHold

img0.png

Best regards.
Alvaro.
Offline DeepButi  
#14 Posted : 26 October 2021 11:48:01(UTC)
DeepButi

Rank: Newbie

Groups: Registered
Joined: 23/10/2021(UTC)
Posts: 7
Spain
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 Acute Acute

Decimal places set to 4 everywhere Dry

Sin titulo.jpg



Offline Razonar  
#15 Posted : 26 October 2021 18:21:13(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: DeepButi Go to Quoted Post
...
Just trying to figure out how to avoid too many decimals now Acute Acute

Decimal places set to 4 everywhere Dry



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.
Offline DeepButi  
#16 Posted : 26 October 2021 20:01:06(UTC)
DeepButi

Rank: Newbie

Groups: Registered
Joined: 23/10/2021(UTC)
Posts: 7
Spain
Location: Sant Cugat

Originally Posted by: Razonar Go to Quoted Post


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.

Offline johnspark  
#17 Posted : 27 October 2021 08:25:12(UTC)
johnspark


Rank: Advanced Member

Groups: Registered
Joined: 26/09/2021(UTC)
Posts: 66
Australia
Location: Adelaide

Was thanked: 5 time(s) in 3 post(s)
Originally Posted by: DeepButi Go to Quoted Post
Originally Posted by: Razonar Go to Quoted Post


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
Offline overlord  
#18 Posted : 28 October 2021 00:53:09(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,124
Turkey

Was thanked: 506 time(s) in 337 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
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.
Offline ola_nicolas  
#19 Posted : 10 July 2022 15:45:20(UTC)
ola_nicolas


Rank: Advanced Member

Groups: Registered
Joined: 21/11/2017(UTC)
Posts: 112
Romania
Location: Olt county

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: PompelmoTell Go to Quoted Post
... 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.
Offline Jean Giraud  
#20 Posted : 11 July 2022 15:47:13(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: ola_nicolas Go to Quoted Post
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).

Users browsing this topic
2 Pages12>
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.