How to plot data with very small differences

조회 수: 9 (최근 30일)
Maroco Sc
Maroco Sc 2019년 11월 7일
댓글: darova 2019년 11월 7일
I have this data:
t = 1:15
Y1 = [1.99998031791996 1.99992023945870 1.99981921018751 1.99967676841284 1.99949246227265 1.99926639580871 1.99899815287861 1.99868750141895 1.99833464599514 1.99793876329308 1.99750049183611 1.99701928683627 1.99649511996620 1.99592851434409 1.99531906441858]
Y2 = [1.99998013911465 1.99991950960070 1.99981753603705 1.99967388705831 1.99948842208052 1.99926102409693 1.99899151220770 1.99867985581043 1.99832594938601 1.99792962177691 1.99749121702464 1.99701033438890 1.99648712446596 1.99592120112878 1.99531367241250]
The difference between Y1 and Y2 is too small, so when I plot them they look same.
How can I plot Y1 and Y2 together and show the differences (I do not want to plot a line shows the differences between them)
This is how the plots look like:
lines2.JPG
x-axis values from 1:15 and increase by 1
and Y1 and Y2 should be plotted as a line
plot(t,Y1,'-r'); hold on
plot(t,Y2,'-b');
  댓글 수: 1
darova
darova 2019년 11월 7일
YOu can use different markers
plot(t,Y1,'-r'); hold on
plot(t,Y2,'.b');

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

답변 (1개)

Daniel M
Daniel M 2019년 11월 7일
You can try using stem or scatter or playing the axis limits. Or just plot the residuals, which is a pretty standard thing to do.
  댓글 수: 1
Maroco Sc
Maroco Sc 2019년 11월 7일
편집: Maroco Sc 2019년 11월 7일
I have modified the question.
Could you please give an example for one of these methods.

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by