two data in one plot graph
3 次查看(过去 30 天)
显示 更早的评论
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 ?
0 个评论
回答(2 个)
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);
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!