How to say that 2 stem graphs are identical?

조회 수: 3 (최근 30일)
ellis
ellis 2014년 3월 19일
댓글: Star Strider 2014년 3월 20일
Hi, i want to know how to prove that two graphs from pixel images are the same? Thanks for your help

채택된 답변

Star Strider
Star Strider 2014년 3월 19일
I doubt you could ever prove the two are the same, but statistically you can estimate the probability that they are not different.
Your ‘graph.fig’ file contained all the ‘YData’ information necessary. (This was something of an adventure in handle graphics for me!)
After getting the data:
hs1 = subplot(2,1,1)
hs2 = subplot(2,1,2)
x1d = get(get(hs1,'Children'),'XData');
x2d = get(get(hs2,'Children'),'XData');
y1d = get(get(hs1,'Children'),'YData');
y2d = get(get(hs2,'Children'),'YData');
the easiest statistical test was the correlation coefficient:
[R,P]=corrcoef(y1d, y2d)
that produced:
R = 974.4480e-003
P = 94.3711e-168
or an infinitesimal probability of no correlation.
A chi-squared test between y1d and y2d might yield definitive information because it compares each observation in y1d and y2d, and gives the probability that the ‘patterns’ between them are different. (When I did these calculations, I got chi-square = 1055.5 with 233 degrees-of-freedom, essentially a zero probability that they are different.)
  댓글 수: 2
ellis
ellis 2014년 3월 20일
Thanks you for your help.... Yesterday i have been able to get a percentage match of the 2 graphs and i have used also the corrcoef function.
Thanks for your code ;)
Star Strider
Star Strider 2014년 3월 20일
My pleasure!

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

추가 답변 (1개)

Viju
Viju 2014년 3월 19일
If you have the underlying data that created the two stem plots, you can check the difference between the two data. Say you have the vector x and vector y, you can plot x - y and show that the difference is zero (or close to zero).

카테고리

Help CenterFile Exchange에서 Hypothesis Tests에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by