フィルターのクリア

two data in one plot graph

1 回表示 (過去 30 日間)
YJ
YJ 2014 年 4 月 15 日
回答済み: Lisa Justin 2014 年 4 月 15 日
I have two set of data
x
y1 y2
I want to plot (x,y1) and (x,y2) at a same graph. How do I do that??
they all have same matrix.
Also how can I find a break even point ?

回答 (2 件)

Sara
Sara 2014 年 4 月 15 日
figure
plot(x,y1,x,y2)
or
plot(x,y1,'r',x,y2,'b')
if you want to assign colors to the curves. If you want to find where they intersect, I recommend: http://www.mathworks.com/matlabcentral/fileexchange/11837-fast-and-robust-curve-intersections/content/intersections.m
[x0,yo]=intersections(x,y1,x,y2,1);

Lisa Justin
Lisa Justin 2014 年 4 月 15 日
Sara is correct, you could also use
plot(x,y1,'r')
hold on
plot(x,y2,'b')

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by