MATLAB Answers

0

plot curve take care of edges

Asked by ahmed youssef on 26 Dec 2016
Latest activity Edited by Image Analyst
on 26 Dec 2016
I am plotting curve it is increased from zero to 1 with small slop and saturated at 1. I need to know "plot" command that take care of beginning and ending curve.

  2 Comments

KSSV
on 26 Dec 2016
If you have x and y coordinates, plot will plot it. Plot will take care depending on your data.
someone shows me command other than plot to show how it rise and saturated

Sign in to comment.

Tags

1 Answer

Answer by Image Analyst
on 26 Dec 2016

Simply use plot(). Here's an example:
x = linspace(0, pi/2, 500);
y = 1.2*sin(x);
y(y>1) = 1;
plot(x, y, 'b-', 'LineWidth', 2);
grid on;

  2 Comments

someone shows me command other than plot to show how it rise and saturated
Image Analyst
on 26 Dec 2016
There are other ways (functions) to plot, like bar(), stem(), area(), etc. Pick whichever one gives you the appearance you like.

Sign in to comment.