plot 2 curves with 'very close' y values
이전 댓글 표시
Hello,
I would like to know if there is a way in matlab to plot 2 curves on the same plot, that have very close y values (very small differences).
Note: I have tried the 'log' for the y-scale but gave a similar view as the linear!
Thanks
채택된 답변
추가 답변 (2개)
If you want to see the differences and at the same time keep values of your vectors, i would recommend something like this:
plot(x1d,x2d,'b-'); %your values
hold on;
plot([0 3],[0 3], 'k-'); % 1:1 line
So you have both your vectors in the x and y axes, and the diagonal line shows points of equal value. Below the diagonal one is greater than the other. Vice-versa for above. The further away, the larger the difference.
댓글 수: 6
Sam Alex
2012년 12월 22일
José-Luis
2012년 12월 22일
Edited code: I was not plotting a line but points, please look at my updated answer.
Sam Alex
2012년 12월 22일
José-Luis
2012년 12월 22일
Not like that, but plotmatrix() could help you for that.
Sam Alex
2012년 12월 22일
José-Luis
2012년 12월 22일
Not sure about that, but I'm glad I could help.
John D'Errico
2012년 12월 22일
0 개 추천
So why not just plot the difference?
Or create two plots as a subplot, one with just curve 1, and the second as the difference between the two curves?
Or, have both plots on the same set of axes, with a double y axis?
help plotyy
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
