http://www.mathworks.com/matlabcentral/newsreader/view_thread/332428
MATLAB Central Newsreader  plotting vectors into step functions
Feed for thread: plotting vectors into step functions
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Sat, 02 Nov 2013 15:51:08 +0000
plotting vectors into step functions
http://www.mathworks.com/matlabcentral/newsreader/view_thread/332428#913509
Nee Gulvadi
Hello,<br>
<br>
I want to create heaviside functions that go randomly either 1 to 1 with the square wave having a period of 2 seconds. I have already generated the random numbers into a vector such as [1 1 1 1 1] etc. So how do I plot this vector now into a step function? I want to do it in heaviside functions.. I can get the plot of the vector but can't get step functions it just connects the points. Also it starts at 1 and not 0 and I need it to start at 0. If someone could help me that would be great.. I also will need to end up integrating this wave into triangle wave at the right times but I should be able to figure that out.<br>
<br>
Thanks, Nee

Sat, 02 Nov 2013 19:49:50 +0000
Re: plotting vectors into step functions
http://www.mathworks.com/matlabcentral/newsreader/view_thread/332428#913513
TideMan
On Sunday, November 3, 2013 4:51:08 AM UTC+13, Nee Gulvadi wrote:<br>
> Hello,<br>
> <br>
> <br>
> <br>
> I want to create heaviside functions that go randomly either 1 to 1 with the square wave having a period of 2 seconds. I have already generated the random numbers into a vector such as [1 1 1 1 1] etc. So how do I plot this vector now into a step function? I want to do it in heaviside functions.. I can get the plot of the vector but can't get step functions it just connects the points. Also it starts at 1 and not 0 and I need it to start at 0. If someone could help me that would be great.. I also will need to end up integrating this wave into triangle wave at the right times but I should be able to figure that out.<br>
> <br>
> <br>
> <br>
> Thanks, Nee<br>
<br>
help stairs