1 страниц (11 вхождений)
Definition of Variables with several "if". - How to define a variable depending on other variables - Сообщения
Is it possible to define a variable, that depends on an other variable.
I want to define a variable like: "Mpa".
The "Mpa" is 400N/mm^2, if the variable "Diameter" is 12mm.
If the variable "Diameter" is 14mm, "MPA" should be 300N/mm^2.
If the variable "Diameter" is 16mm, "MPA" should be 250/mm^2.
...
At the end, the list is about 15 different possibilities.
I came from Mathcad. Mathcad has the option "add Line". With this, you can add as much "if"-Lines as you wand.
Is there a possibility to do this in Smath Studio also?
Thank you.
I want to define a variable like: "Mpa".
The "Mpa" is 400N/mm^2, if the variable "Diameter" is 12mm.
If the variable "Diameter" is 14mm, "MPA" should be 300N/mm^2.
If the variable "Diameter" is 16mm, "MPA" should be 250/mm^2.
...
At the end, the list is about 15 different possibilities.
I came from Mathcad. Mathcad has the option "add Line". With this, you can add as much "if"-Lines as you wand.
Is there a possibility to do this in Smath Studio also?
Thank you.
If I understood correct, what you need is cases() function.
Please note that cases() function is not directly included in SMath "core" functions; you will find it after installing a plug-in called Custom Functions.
You can find it in SMath extension manager.
You can find it in SMath extension manager.
Hey, thank you all. You are awesome. It worked. Thanks for your detailed inputs.
Regards…
Regards…
Hello
For this type of project, I try to fit the data to a curve and find its equation, and thus calculate any value in the specified range.
Although in this case, the values given are very few, as an example I annex the corresponding calculation.

Define_a_Variable_Ajust_by_Last_Square.sm (58 КиБ) скачан 202 раз(а).
Best Regards
Carlos
For this type of project, I try to fit the data to a curve and find its equation, and thus calculate any value in the specified range.
Although in this case, the values given are very few, as an example I annex the corresponding calculation.

Define_a_Variable_Ajust_by_Last_Square.sm (58 КиБ) скачан 202 раз(а).
Best Regards
Carlos
Hola Carlos, best 2022.
Pretty clean Quadratic fit !
Take care ... Jean
Quadratic fit.sm (14 КиБ) скачан 140 раз(а).
Pretty clean Quadratic fit !
Take care ... Jean
Quadratic fit.sm (14 КиБ) скачан 140 раз(а).
1 страниц (11 вхождений)
-
Новые сообщения
-
Нет новых сообщений