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

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
Offline Razonar  
#21 Posted : 30 May 2024 07:54:34(UTC)
Razonar


Rank: Advanced Member

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

Was thanked: 925 time(s) in 588 post(s)
Originally Posted by: wb.c Go to Quoted Post
I’m confused because on your original Evals() function everything was input into the Evals() function. ...


With some cheats: all variables must to be undefined and units are input as undefined global variables ~N instead true SMath units 'N. For that units appear in bold black but not in bold blue. Also, decimal numbers are converted into symbolic global variables.

Mathcad block gives the chance to use only standard SMath expressions.

Best regards.
Alvaro.

Offline Kenny Lemens  
#22 Posted : 01 June 2024 03:28:17(UTC)
Kenny Lemens


Rank: Advanced Member

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

Was thanked: 71 time(s) in 45 post(s)
Greetings!

For what it is worth, here is my attempt at the problem at hand:
SMath_2024-05-31.jpg


These equations only require the use of Davide's "Custom Functions"; you can download the sheet here:
EquationsWithSymbolicSubstitution.sm (85kb) downloaded 16 time(s).


In order for this to work:
  • Customized units: the symbolic results are not true units; else there were issues with simplifying to base units
  • Abuse of unique 'units' properties: Units will cheat numbers tighter together, and will not use the multiplication symbol: giving a cleaner look. However, they will display as blue...
  • Reliance on Strings: Without passing certain units/variables through as a string, I would have no control to reference the numbers/units/variables at hand. SMath likes to simplify to base units, and substitute variables for contents. This creates a hassle for input, but once configured: should be hassle free.
  • Assumption that nobody really uses Absolute Variables (the ~ Bold Black Variables): I use these variables as alias: being assumed undefined, I can work with them as math, and then just substitute the actual variable at the proper time (use of 「~a」 to be replaced with 「a」 as/if desired. This could have been accomplished through a 'string', but the benefit of working with math objects was too great to ignore.
  • Grouping Hack: At the end of the day, Symbolic will attempt to group terms together and report numbers as fractions. Thus, I utilize the "function" feature, thus having math in an undefined function that cannot evaluate: thus remains ungrouped in what appears to be parenthesis. I use a "UNIT of NONBRACKING-SPACE CHARACTER as the UNDEFINED function name (ie., '\FEFF\() )
  • Heavy use of special Unicode characters: Terms like "=" and ":" have special meaning that cannot be avoided. My only recourse was to use characters that look like "=" in order to produce aesthetically appealing results (e.g.,"꞊꞊"; "꞉"; "⚌" ). It is through the trick of a period like character that the numbers can appear to be a decimal within the Symbolic Evaluation environment.


I will admit, this will not be perfect as error handling is lacking, you will notice some multiplication symbols bleed through (as the 'result' is just a GIANT multiplication statement of variables, Functions, units, and numbers). The absolute variables must be undefined to work as expected, and some terms like lele() will unravel to its core SMath definition (e.g., lele(~1,~2,~3) =-> (~2≤~1)&(~1≤~3) ). I will also note that it does not like multiple units (like 'ft*'in); it really can only handle (1) unit: thus you may need to create a custom unit to serve the desired effect.


May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo Banzai

Hotkeys: https://en.smath.com/for...rce.ashx?a=45771&b=2
thanks 1 user thanked Kenny Lemens for this useful post.
on 01/06/2024(UTC)
Offline wb.c  
#23 Posted : 01 June 2024 04:43:02(UTC)
wb.c


Rank: Advanced Member

Groups: Registered
Joined: 02/04/2018(UTC)
Posts: 155
United States

Was thanked: 26 time(s) in 22 post(s)
Originally Posted by: Razonar Go to Quoted Post


With some cheats: all variables must to be undefined and units are input as undefined global variables ~N instead true SMath units 'N. For that units appear in bold black but not in bold blue. Also, decimal numbers are converted into symbolic global variables.

Mathcad block gives the chance to use only standard SMath expressions.

Best regards.
Alvaro.



So, there is no feasible way to produce something like this?

2024-05-31 11_34_35-SMath Solver - [Evals v3.sm_].png

If that is the case, at the very least we should be able to do this:
Maybe we just have the formula and "unit" part in a separate MathCAD block so that it can be hidden?

2024-05-31 11_42_51-SMath Solver - [Evals v3.sm_].png
Offline wb.c  
#24 Posted : 01 June 2024 04:45:19(UTC)
wb.c


Rank: Advanced Member

Groups: Registered
Joined: 02/04/2018(UTC)
Posts: 155
United States

Was thanked: 26 time(s) in 22 post(s)
Originally Posted by: Kenny Lemens Go to Quoted Post
Greetings!

For what it is worth, here is my attempt at the problem at hand:

May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ


Well, this is definitely a unique approach, thanks for the input.
Offline Razonar  
#25 Posted : 01 June 2024 06:06:00(UTC)
Razonar


Rank: Advanced Member

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

Was thanked: 925 time(s) in 588 post(s)
Originally Posted by: wb.c Go to Quoted Post
One more thing that I noticed when testing. Seems like the MathCAD blocks don't like subscripts on variables. ...


Hi. Mathcad block must to cover all the equations regions. The subscript enlarge the region. Just enlarge the Mathcad block a little bit.

pa.png

Best regards.
Alvaro.
Offline Razonar  
#26 Posted : 01 June 2024 06:08:34(UTC)
Razonar


Rank: Advanced Member

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

Was thanked: 925 time(s) in 588 post(s)
Originally Posted by: Kenny Lemens Go to Quoted Post
Greetings! For what it is worth, here is my attempt at the problem at hand ...


Hi Great approach.

Best regards.
Alvaro.
Offline wb.c  
#27 Posted : 06 June 2024 06:25:39(UTC)
wb.c


Rank: Advanced Member

Groups: Registered
Joined: 02/04/2018(UTC)
Posts: 155
United States

Was thanked: 26 time(s) in 22 post(s)
Alvaro,

What did you think about the idea of variables in one region and the formula and output unit in another?
Seems like an easy way to hide the second region and have a cleaner end result. Do you think that’s feasible?

Thanks,
Offline Razonar  
#28 Posted : 06 June 2024 17:04:33(UTC)
Razonar


Rank: Advanced Member

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

Was thanked: 925 time(s) in 588 post(s)
Originally Posted by: wb.c Go to Quoted Post
Alvaro,

What did you think about the idea of variables in one region and the formula and output unit in another?
Seems like an easy way to hide the second region and have a cleaner end result. Do you think that’s feasible?
Thanks,


Hi. Yes, it's a very good idea. This is a way about how to implement that.

eval.png

eval2.png

EvalSF.sm (186kb) downloaded 23 time(s).

Best regards.
Alvaro.

Edited by user 06 June 2024 17:08:48(UTC)  | Reason: Not specified

Offline wb.c  
#29 Posted : 27 June 2024 16:08:18(UTC)
wb.c


Rank: Advanced Member

Groups: Registered
Joined: 02/04/2018(UTC)
Posts: 155
United States

Was thanked: 26 time(s) in 22 post(s)
Hey Alvaro, any way to do this like you did with V3 only showing the initial substitution without showing extra steps?
Offline Razonar  
#30 Posted : 30 June 2024 11:32:41(UTC)
Razonar


Rank: Advanced Member

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

Was thanked: 925 time(s) in 588 post(s)
Originally Posted by: wb.c Go to Quoted Post
Hey Alvaro, any way to do this like you did with V3 only showing the initial substitution without showing extra steps?


Hi. Yes. You can delete the undesirable elements at the end of the function:

ans1.png

Editing:

ans2.png

Result:

ans3.png

Best regards.
Alvaro.
Offline wb.c  
#31 Posted : 03 September 2024 04:43:01(UTC)
wb.c


Rank: Advanced Member

Groups: Registered
Joined: 02/04/2018(UTC)
Posts: 155
United States

Was thanked: 26 time(s) in 22 post(s)
Hey Alvaro,

Is there any way to replace the "≈" symbols in the results to be other symbols?
I think a regular equals sign or U2550 "═" could be used for the first one since it is just showing the formula. Then perhaps arrows (→) to the substitution part and the result part.
Was trying to replace these within the function, but it messes it all up. Seems like it can't be done as in some earlier versions of the function.
Thanks,
Offline Razonar  
#32 Posted : 03 September 2024 13:56:44(UTC)
Razonar


Rank: Advanced Member

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

Was thanked: 925 time(s) in 588 post(s)
Originally Posted by: wb.c Go to Quoted Post
Hey Alvaro,

Is there any way to replace the "≈" symbols in the results to be other symbols?
I think a regular equals sign or U2550 "═" could be used for the first one since it is just showing the formula. Then perhaps arrows (→) to the substitution part and the result part.
Was trying to replace these within the function, but it messes it all up. Seems like it can't be done as in some earlier versions of the function.
Thanks,


Hi. Yes, but it's not trivial replacing ≈ by SMath equals ≡ because it returns zero after evaluation. This is a workaround.

EvalSF with arrow.sm (189kb) downloaded 11 time(s).

fig.png

fig.png

Best regards.
Alvaro.
Users browsing this topic
2 Pages<12
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.