Hi , looking to create a plot similar to the plot attached. I have two sets of data which are similar and I want to compare them 'back-to-back'. How do I go about doing that on Matlab? I'm familiar with matlab plotting but with only very basic knowledge. Any help would be appreciated.
This is the image.
Thanks

댓글 수: 1

somayeh Mohammady
somayeh Mohammady 2018년 6월 25일
I found that the easiest way doing it is to multiply the matrix containing your figure by .*(-1), and plot it as usual. It worked for me.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2015년 7월 19일

0 개 추천

Wouldn't it be the most direct and easiest way to draw the data in one axes?
t = 1:10;
data1 = rand(1, 10);
data2 = rand(1, 10);
plot(t, data1, 'r');
hold on
plot(t, data2, 'b');

댓글 수: 3

Or with a single call:
plot(t, data1, 'r', t, data2, 'b');
Image Analyst
Image Analyst 2015년 7월 19일
JL's "Answer" moved here since it's not an actual official "Answer" to his original question:
No it must be mirrored below y axis like in the photo. The intensities will be roughly the same but not quite so drawing the data in one axis won't show the difference well enough.
You mean like
plot(t, data1, 'r', t, -data2, 'b')
?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Annotations에 대해 자세히 알아보기

태그

질문:

2015년 7월 19일

댓글:

2018년 6월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by