Code Mathcad to Smath

Code Mathcad to Smath - Сообщения

#21 Опубликовано: 24.12.2021 12:57:12
Ruben Sidranski

Ruben Sidranski

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

Группа: 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 Опубликовано: 26.12.2021 15:35:23
Jean Giraud

Jean Giraud

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

Группа: 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 КиБ) скачан 32 раз(а).
#23 Опубликовано: 26.12.2021 21:44:01
Jean Giraud

Jean Giraud

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

Группа: 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 Опубликовано: 27.12.2021 12:32:32
Jean Giraud

Jean Giraud

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

Группа: 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 КиБ) скачан 26 раз(а).
#25 Опубликовано: 27.12.2021 17:19:04
Jean Giraud

Jean Giraud

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

Группа: User

Recast Integrator.PNG
#26 Опубликовано: 27.12.2021 17:41:45
overlord

overlord

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

Группа: 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.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений