1 страниц (4 вхождений)
How to define a piecewise functions ? - Сообщения
#1 Опубликовано: 07.04.2011 08:52:35
Newbie question :
How can I define a function by different expressions on various intervals ?
In Mathcad, the way to create the vertical line is either the square bracket, or go to 'add line'
from the 'programming' toolbar.

How can I define a function by different expressions on various intervals ?
In Mathcad, the way to create the vertical line is either the square bracket, or go to 'add line'
from the 'programming' toolbar.

#2 Опубликовано: 08.04.2011 04:06:56
Hello,
In SMath is the same. Did you try it?
Here are the examples of making piecewise functions.

The lines are not connected - it is due to choosing "Graph by points" from the "Plot" side panel.
Try "Graph by lines" to see the difference.
Btw, pay attention that a logical expression like x < y < z iz not working in SMath like in Mathcad.
[MATH=eng]5<4<6=1[/MATH]
Use parenthesis when mixing logical and relational operators and in the case you are not sure about the operator precedence.
Regards,
Radovan
WroteHow can I define a function by different expressions on various intervals ?
In Mathcad, the way to create the vertical line is either the square bracket, or go to 'add line'
from the 'programming' toolbar.
In SMath is the same. Did you try it?
Here are the examples of making piecewise functions.
The lines are not connected - it is due to choosing "Graph by points" from the "Plot" side panel.
Try "Graph by lines" to see the difference.
Btw, pay attention that a logical expression like x < y < z iz not working in SMath like in Mathcad.
[MATH=eng]5<4<6=1[/MATH]
Use parenthesis when mixing logical and relational operators and in the case you are not sure about the operator precedence.
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Опубликовано: 08.04.2011 12:28:10
Radovan,
Does this only work with 0.89.8 beta?
I duplicate what you've done but get no graph. Says f2([]) not defined.
Does this only work with 0.89.8 beta?
I duplicate what you've done but get no graph. Says f2([]) not defined.
Ed
#4 Опубликовано: 08.04.2011 13:11:14
Yes Ed - it seems you are right. I did this in v.0.89.8 but in v0.89 the f2(x) function does not work in the graph (not defined...), as you explained.
I do not know the reason, just guessing that Andrey fixed that in the 0.89.8 version.
Regards,
Radovan
I do not know the reason, just guessing that Andrey fixed that in the 0.89.8 version.
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 страниц (4 вхождений)
-
Новые сообщения
-
Нет новых сообщений