Code Mathcad to Smath

Code Mathcad to Smath - Messages

#21 Posted: 12/24/2021 12:57:12 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Wrote

Wrote

Is there a reason why Dy is within in eval()?


eval() makes computations faster most of time.
Very minor times, may have no effect or slows the calculation.
It would be wise to choose where and when to use it.

2021-12-23_17-53.png

Wrote

I think this is a very important point that I need to keep in mind. Using unique names in functions is also a great suggestion. Thank you overlord.


Well thank you, glad if I could help.
There are some other tricks to remember as well.
Here is list of which come to my mind at this instant;
  • symbolic/numeric optimization
    most errors can be parsed with selecting the right one
  • Δ temperatures (Δ°C, Δ°F, Δ°Re)
  • not using units for some solvers {solve(), roots()}
    or using multiplications at right place to trick solver as value is unitless
  • using maple() or maxima() for most symbolic results (better support)
  • smath vectors/matrices starts with 1, mathcad starts with 0
    some new users troubles with converting mathcad functions to smath
  • recursive functions shall give an error after 50 steps
    better not to use it, try to wrtie algorithms conventional way
  • eval() for faster calculations
  • line() for functions (not needed always)
  • to be careful for variable names
  • choosing right plot for the right job


Interesting list and I like the explanation of "LINE". In addition, it took me a bit to understand using # in the variable name when I first started. I now use it all the time, but it took me a bit for it to sink in & a newbie needs to understand that it's a special character (I tend to use # first). As I update some of my calculations, I'll look at both of these items
#22 Posted: 12/26/2021 3:35:23 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

1. as well, you can recast the function name.
2. and use algo style to be more pro.

Maths Algo Style READ First.sm (51 KiB) downloaded 32 time(s).
#23 Posted: 12/26/2021 9:44:01 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Interesting list and I like the explanation of "LINE". In addition, it took me a bit to understand using # in the variable name when I first started.


line | is typical of an algorithmic suite wrt a dependent program.
Download 2022 Samples ... see color(M).
The algo style I offered previously was not possible official SS 5346,
but possible from Un-Official SS 5346 from recollection.
Then came superb native Smath 6179.
Cheers ... Jean

#24 Posted: 12/27/2021 12:32:32 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

1. as well, you can recast the function name.


That's what I meant by recast, last page of the attached.
Cheers ... Jean.

Recast.PNG

Integrate AdaptiveRombergKernel FIRST Tool.sm (152 KiB) downloaded 27 time(s).
#25 Posted: 12/27/2021 5:19:04 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Recast Integrator.PNG
#26 Posted: 12/27/2021 5:41:45 PM
overlord

overlord

552 likes in 1332 posts.

Group: Moderator

Wrote

Interesting list and I like the explanation of "LINE".


Wrote

I now use it all the time.


After I finished to write list, I realized it too. (swh)
Line explanation is not mine, it is from Reference Book.
I do started to use some special characters too.
This is much easier to assign unique variable names at first than maintaining after using them.
  • New Posts New Posts
  • No New Posts No New Posts