plot curve take care of edges
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
KSSV
2016 年 12 月 26 日
If you have x and y coordinates, plot will plot it. Plot will take care depending on your data.
回答 (1 件)
Image Analyst
2016 年 12 月 26 日
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 件のコメント
Image Analyst
2016 年 12 月 26 日
編集済み: Image Analyst
2016 年 12 月 26 日
There are other ways (functions) to plot, like bar(), stem(), area(), etc. Pick whichever one gives you the appearance you like.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!