Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with plotting

Status
Not open for further replies.

matlabusermanos

Computer
Dec 4, 2007
6
Hello to everyone,

I an amateur user of Matlab and I want your help.
I want to plot a figure like the one of the jpg which I have attached to post.I used the function plot but the graph is depicted not with continous lines parrallel to the x-axis but with discrete points.How can I draw such a figure?
(considering that I have insert to code some samples manually)
I am looking forward for your reply.
Thank you!

Manos
 
Replies continue below

Recommended for you

Instead of default plotting style (looks like points only), tell plot to specificaly use a line:

plot(t,signal,'r-') % a red line, not points
 
I tried the suggested solution but still I have problem with the plotting. I include a .rar file with 3 files:

(1) my code
(2) the desired output pattern
(3) the output from the code I wrote

If you can help again I'll be very happy about this, because is a critical project for me!
Thanks again!
 
 http://files.engineering.com/getfile.aspx?folder=2151bf6b-31c5-4acf-b256-4cc1406d77ca&file=Desktop.rar
Status
Not open for further replies.

Part and Inventory Search

Sponsor