>How do you graph piecewise functions on the HP48? For example, x^2+1
>with x >=0.
Try plotting this: 'IFTE(x>=0,x^2+1,0)'.
Or this: << IF X 0 >= THEN 'x^2+1' ELSE 0 END EVAL >>
Jarno Peschier, jpes...@cs.ruu.nl, 125:3101/100.1@WEM, X:X8X/X1X.X@XiXo,
8X:X5X/X.X@XaXiXNXt, 27:2331/214.1@SigNet, 74:3108/102.1@QuaZie
What was was, before was was was? Before was was was, was was is.
When I plot a piecewise function like that, the calculator graphs a Y=0
line until it gets to the part it is supposed to start; so then it
connects the starting point of the graph to the Y-axis. Is there anyway
to get around this?
Turn of the connect plot flag (don't know the number of the top of my
head, let's call it -## for now, okay? ;-)).
But this gives you an "ugly" plot if your function is a bit steep. Even better would be to plot something like this:
<< IF x 0 >=
THEN -## SF @ Connect plot
ELSE -## CF @ Don't connect plot
Something like that. Of course you could just as easily just plot
'x^2+1' but then with the domain set to [0,3.1]. <grin>
Try plotting with the connect mode disabled (in the FLAG menu in the PLOT
menu). Might do the trick, but then you'll hvae some discontinuity in your
graph, especially if it has a large slope.
// I went out walking under an atomic sky __ | . __ | //
// Where the ground won't turn __| |\ | | |\/| __ |__ |--. //
// And the rain it burns |__| | \| | | | |__| __| | | //
// Like the tears when I say goodbye | | | |__ Sabnis //
//////////////////////////\ f0...@Lehigh.EDU \////////////////////////////
> How do you graph piecewise functions on the HP48? For example, x^2+1
> with x >=0.
Use the IFTE function. Your example could be plotted as
'IFTE(x>=0,x^2+1,0)'. There are three parts in the parentheses; the first
part is the test expression, the second part is what is used if the test
expression is true and, the third part is what is used if the test
expression is false.
Eric Haas Internet: ERIC...@delphi.com FidoNet: Eric.Haas@1:261/1000
Rainbow V 1.14.1 for Delphi - Registered
Using this method, the function is undefined for any X less than zero and,
the HP48 won't graph it at all.