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

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline student_betka  
#1 Posted : 28 June 2022 21:53:21(UTC)
student_betka

Rank: Newbie

Groups: Registered
Joined: 28/06/2022(UTC)
Posts: 1
Czech Republic

Is there some way how to substitute variables into the function? For example I define two variables:
a=1m
b=2m
and then I define function A=a·b=2m^2
But I need something like this A=a·b=1·2=2m^2
Is it possible?

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

Offline Kenny Lemens  
#2 Posted : 28 June 2022 23:05:29(UTC)
Kenny Lemens


Rank: Advanced Member

Groups: Registered
Joined: 11/01/2018(UTC)
Posts: 131
Man
United States
Location: Wisconsin

Was thanked: 58 time(s) in 37 post(s)
Greetings!

This is possible, but there is some work involved to make it happen. After you define your variables a and b, do the following:

STEP 1) Insert a text region (i.e., Keypress the double quotes [ " ]); this used to keep math/text on the same line.


STEP 2) Type your equation 「A:a*b=#」, the text 「 = 」, and the equation 「A=#」 into your text region.

STEP 3) Right-click your 1st Equation, on your context menu you will see [Optimization]; change this option to [None]

STEP 4) Right-Click your 2nd Equation, on your context menu: uncheck the [Display input data] option.


NOTES: With units, it will simplify 「1*m」 to 「m」; so this isn't a perfect solution by any means.

Example:
Here is a file with an example: SMath - substituting variables into same equation.sm (47kb) downloaded 16 time(s).
SMath - substituting variables into same equation.jpg




Hope this helps!
Kenny Lemens, P.E.

Edited by user 28 June 2022 23:27:48(UTC)  | Reason: Added image; uploaded example file;

"No matter where you go, there you are." -Buckaroo Banzai

Hotkeys: https://en.smath.com/for...rce.ashx?a=45771&b=2
Offline Razonar  
#3 Posted : 29 June 2022 04:43:35(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. It would be great to have a new equals sign, such as ≡ , that shows the substitution of an expression for its values, but without the rounding problems that this proposed solution has, and showing the final result in Pascals, perhaps.

Clipboard04.jpg

show.sm (15kb) downloaded 37 time(s).

show.pdf (57kb) downloaded 21 time(s).

Best regards.
Alvaro.
Offline Jean Giraud  
#4 Posted : 29 June 2022 17:15:54(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)
When it comes to expand/explicit maths formulas,
it soon turns a monkey business, that hits the wall.
Inspect the 14 same representations, and few more.
Enjoy ... Jean.

Maths 0 Formula Representations QUICK.sm (34kb) downloaded 55 time(s).
Users browsing this topic
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.