MATLAB - creating a plot

Thread Starter

shespuzzling

Joined Aug 13, 2009
88
Hi,

I need to create a plot in matlab and I don't have any experience with the program. The plot we're supposed to create looks like a stepped sine wave with 6 distinct intervals (i.e. y=50 for the first interval, then 90, then 50, then -30, then -70, then -30 and 0).

We're sampling this at a particular frequency so I created the vector for the x axis but I can't figure out how to do it for the y axis. I tried using the for command, but I don't think I'm doing that right. If anybody can help me I'd appreciate it.

Thanks.
 

jut

Joined Aug 25, 2007
224
Provide a sketch for desired plot. Also provide the code you've tried in matlab so I can help you better.
 
Top