Display values with definition

Display values with definition - Messages

#1 Posted: 4/5/2012 3:08:31 PM
marcofk

marcofk

8 likes in 19 posts.

Group: User

Hello all.

I was wondering if it's possible to add a feature that displays the result of an equation after its definition, for example:

A:= 5

x:= 3

y:= A*x = 15

That would remove a lot of duplication in creating a calculation sheet, although it might not seem so evident from the example (I had to keep it short as it's not an existing feature - to my knowledge).

Of course, if the feature already exists, can anyone point me out how to use it? Smath won't let me type the "equal" sign after I've defined a variable using ":=" in the same line.

Thanks for any response.

Regards.
#2 Posted: 4/5/2012 3:35:41 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello,

The equal sign at the end might be redundant IMHO. Maybe other users will not agree with me. You can just type "y=" and see its result. Moreover:
You can point - hoover the mouse over the expression and see its actual result,

Then you recheck it you suspect that it has been redefined somewhere in the worksheet

Or you can just type the variable name - you will see its value when the Dynamic Assistance is active.


Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Posted: 4/5/2012 4:18:15 PM
kilele

kilele

133 likes in 397 posts.

Group: User

By the way, wouldn't be useful a feature to display the same equation entered by the user but replacing variables with its current values ?
That would be handy to improve readibility of your documents as well as avoid errors in your calculations.
For example:
A:=5
x:=3
y:=A*x=5*3
#4 Posted: 4/5/2012 4:37:48 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Wrote

By the way, wouldn't be useful a feature to display the same equation entered by the user but replacing variables with its current values ?
That would be handy to improve readibility of your documents as well as avoid errors in your calculations.
For example:
A:=5
x:=3
y:=A*x=5*3


Ah yes, I remember that Andrey mentioned something similar - can not find the actual post about it, sorry. As soon as I find it I'll let you know.

Maybe Andrey will have some more information about this.

Regards,
Radovan

EDIT: Sorry, I was wrong. I remembered this post equal sign. It seems it has nothing related to your question. It was about changing the "equal sign" for the symbolic result.
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#5 Posted: 4/5/2012 5:33:58 PM
kilele

kilele

133 likes in 397 posts.

Group: User

Yes, there could be another equal sign to allow replication of the equation in the same way as the user entered the terms(same order) followed by the same expression replacing variables with their values. Taking the above example, imagine that you have A and X assignments and the equation definition scattered around your sheet, then you might want to recall the function definition followed by its particular expansion and finally the result of the calculation, something like this

A:=5
x:=3
y:=A*x

//further on to both explain and present results
y=A*x=5*3=15

Edit:

See my proposed implementation for user defined expansions
#6 Posted: 4/5/2012 6:04:15 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello,
Wrote

//later on to both explain and present results
y=A*x=5*3=15


I think I get your point, but imagine a more complex expression which includes vectors, matrices, function calls etc. I guess that this might make quite a mess in the sheet by expanding all the terms with subsequent equal signs.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#7 Posted: 4/5/2012 7:03:56 PM
marcofk

marcofk

8 likes in 19 posts.

Group: User

Radovan, thanks for your take on things. I am aware that "functionally" the equal sign is redundant. I am doing many acoustic and structural calculations where I have to "show my workings" as well as the results, and I was just thinking that, rather than add a new line (or box) to show the result of a calculation, being able to show the result at the end of the same calculation would make the calculation report more intelligible. It would also have the benefit of having one less box to reposition when you're reshuffling your calcs around, which I find annoying for two reasons:
1- If I move the definition further down, I lose the result, so I end up spending a lot of time reshuffling boxes rather than moving on with the calcs
2- If the definition uses fractions, powers, roots or integrals (all taller than a line of text), and I try to place the result in line with the definition, the alignment will always be off (unless the unit is also taller than a single line of text).

At the moment I am using the very workaround that you suggested, but I am hoping that eventually the feature can be added to make the calcs look more "human" (i.e. resembling what a normally hand-written calculation would look like).

Just my thoughts.
#8 Posted: 4/6/2012 7:14:52 AM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: Super Administrator

marcofk, I plan to implement the things you've mentioned here (actually these features was already requested many times by others), but it is rather complex task, so I can't say any estimations for now.

Regards.
2 users liked this post
Radovan Omorjan 4/6/2012 12:27:00 PM, Davide Carpi 8/21/2012 12:55:00 PM
#9 Posted: 4/12/2012 9:16:05 AM
marcofk

marcofk

8 likes in 19 posts.

Group: User

Andrey,

I just got back in front of my computer, so I can only answer now.
Thanks for the update. Apologies if my post was a repeat request: the forum goes back a long way and I might have missed it. I look forward to future development, but there's no doubt that it's a great piece of work you've created.

Regards.
#10 Posted: 4/25/2012 1:18:56 PM
Lyle

Lyle

0 likes in 1 posts.

Group: User

As a long time MathCAD user, I find use of the equals sign operator very handy. As others have pointed out it keeps you from having to use another line to display the result. I typically create calculations that I distribute to others and therefore they do not have the option of mousing over the variables.

Z := A + B = 17.0

I would recommend that it be added to SMath's feature set.

Lyle
#11 Posted: 11/8/2012 6:24:17 AM
andreas

andreas

0 likes in 2 posts.

Group: User

Wrote

As a long time MathCAD user, I find use of the equals sign operator very handy. As others have pointed out it keeps you from having to use another line to display the result. I typically create calculations that I distribute to others and therefore they do not have the option of mousing over the variables.

Z := A + B = 17.0

I would recommend that it be added to SMath's feature set.

Lyle



Hi!

This would be a great feature! Im doing calculations, and when I show them to people they find it hard to follow the equations. If there would be a funktion for showing the equation and the values - eg "Z:=A+B=10+7=17" - I would be extremly grateful!

Regards
Andreas
#12 Posted: 11/8/2012 7:51:31 AM
kilele

kilele

133 likes in 397 posts.

Group: User

Wrote

If there would be a funktion for showing the equation and the values - eg "Z:=A+B=10+7=17" - I would be extremly grateful!



Do you mean displaying the final result on the same line and also expansion of the expression in the same way as the user entered the terms ?
I made such request on this very same post above, see:
http://en.smath.info/forum/yaf_postsm6545_Display-values-with-definition.aspx#post6545

Omorr thought that would be a mess to show an expansion of a long/complex expression.
I think it would be a nice addition to give the user the freedom to make such expansions, it would be his responsibility not to mess up the entire sheet with lengthy and confuse blocks of expansions.
This could be a different equal sign for expansions and to avoid omorrs's concerns about annoying readibility in complex expressions, the user could choose for each output term if it'd be unfolded or not (maybe by right-click over the term to show up a menu) or there could be different depth levels to unfold the entire expression like 0,1,2,3.. from outer to inner terms, etc
#13 Posted: 11/8/2012 8:17:38 AM
andreas

andreas

0 likes in 2 posts.

Group: User

Wrote

Wrote

If there would be a funktion for showing the equation and the values - eg "Z:=A+B=10+7=17" - I would be extremly grateful!



Do you mean displaying the final result on the same line and also expansion of the expression in the same way as the user entered the terms ?
I made such request on this very same post above, see:
http://en.smath.info/forum/yaf_postsm6545_Display-values-with-definition.aspx#post6545

Omorr thought that would be a mess to show an expansion of a long/complex expression.
I think it would be a nice addition to give the user the freedom to make such expansions, it would be his responsibility not to mess up the entire sheet with lengthy and confuse blocks of expansions.
This could be a different equal sign for expansions and to avoid omorrs's concerns about annoying readibility in complex expressions, the user could choose for each output term if it'd be unfolded or not (maybe by right-click over the term to show up a menu) or there could be different depth levels to unfold the entire expression like 0,1,2,3.. from outer to inner terms, etc



Yes, exactly like your request. The idea of being able to choose the depht level in a menu like you says would be awesome.
#14 Posted: 12/16/2024 1:24:28 PM
manmoncang

manmoncang

0 likes in 2 posts.

Group: User

in 2024, i still need it.

a:=10
b:=5

c=a*b = 10*5 = 50

hope can get it. tq
  • New Posts New Posts
  • No New Posts No New Posts