Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Step Function' topicStudent Support Forum > General > Archives > "Step Function"

Next Comment >Help | Reply To Topic
Author Comment/Response
David Heaney
02/22/00 7:56pm


Hi.

Im having trouble plotting piecewise continuous functions too. I tried

f[x_]:=Which[ x< 3, 1, 3<=x<5, 2, x>=5, 3]
Plot[f[x],{x,0,10}]

to plot a step function, but it joined the steps which is wrong. I want there to
be jumps.

What can I do.

Thanks,
David.

URL: ,

Subject (listing for 'Step Function')
Author Date Posted
Step Function David Heaney 02/22/00 7:56pm
Re: Step Function P.J. Hinton 02/24/00 4:50pm
Next Comment >Help | Reply To Topic