noob question

noob question - How to get intermediate formula - Сообщения

#1 Опубликовано: 23.10.2021 07:23:31
DeepButi

DeepButi

0 сообщений из 7 понравились пользователям.

Группа: 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 Опубликовано: 23.10.2021 09:04:36
overlord

overlord

551 сообщений из 1332 понравились пользователям.

Группа: 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 Опубликовано: 23.10.2021 11:11:27
DeepButi

DeepButi

0 сообщений из 7 понравились пользователям.

Группа: 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 Опубликовано: 23.10.2021 13:25:33
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

Just my decimal values get displayed as fractions


Evaluate Numeric.
#5 Опубликовано: 23.10.2021 15:39:21
overlord

overlord

551 сообщений из 1332 понравились пользователям.

Группа: 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 Опубликовано: 23.10.2021 16:29:43
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Hi. This is another way.

intermediate_results.sm (14 КиБ) скачан 44 раз(а).

Imagen1.png

Best regards.
Alvaro.
1 пользователям понравился этот пост
sergio 24.10.2021 16:26:00
#7 Опубликовано: 23.10.2021 17:59:30
DeepButi

DeepButi

0 сообщений из 7 понравились пользователям.

Группа: User

Wrote

Hi. This is another way.

intermediate_results.sm (14 КиБ) скачан 44 раз(а).

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 Опубликовано: 24.10.2021 16:00:36
DeepButi

DeepButi

0 сообщений из 7 понравились пользователям.

Группа: 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 Опубликовано: 24.10.2021 22:10:44
overlord

overlord

551 сообщений из 1332 понравились пользователям.

Группа: 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 КиБ) скачан 26 раз(а).

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 Опубликовано: 25.10.2021 07:36:36
sergio

sergio

115 сообщений из 329 понравились пользователям.

Группа: 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 пользователям понравился этот пост
Alvaro Diaz Falconi 25.10.2021 13:22:00
#11 Опубликовано: 25.10.2021 13:29:52
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

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

Using

img0.png

You can get

Hold.sm (9 КиБ) скачан 27 раз(а).

img1.png

or

Hold_v2.sm (9 КиБ) скачан 27 раз(а).

img2.png

Best regards.
Alvaro.
1 пользователям понравился этот пост
sergio 25.10.2021 14:18:00
#12 Опубликовано: 25.10.2021 18:31:25
DeepButi

DeepButi

0 сообщений из 7 понравились пользователям.

Группа: 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 Опубликовано: 25.10.2021 21:06:10
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Wrote

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



Hi. Insert eval( ) in UnHold

img0.png

Best regards.
Alvaro.
#14 Опубликовано: 26.10.2021 05:48:01
DeepButi

DeepButi

0 сообщений из 7 понравились пользователям.

Группа: 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 Опубликовано: 26.10.2021 12:21:13
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: 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 Опубликовано: 26.10.2021 14:01:06
DeepButi

DeepButi

0 сообщений из 7 понравились пользователям.

Группа: 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 Опубликовано: 27.10.2021 02:25:12
John Heidenreich

John Heidenreich

5 сообщений из 67 понравились пользователям.

Группа: 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 Опубликовано: 27.10.2021 18:53:09
overlord

overlord

551 сообщений из 1332 понравились пользователям.

Группа: 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 Опубликовано: 10.07.2022 09:45:20
Nicolae Olaru

Nicolae Olaru

1 сообщений из 115 понравились пользователям.

Группа: 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 Опубликовано: 11.07.2022 09:47:13
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 КиБ) скачан 27 раз(а).

  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений