How to compare two signal

조회 수: 96 (최근 30일)
Tinkul
Tinkul 2014년 5월 24일
댓글: Image Analyst 2014년 5월 24일
I have two signal. One is original signal and other is reconstruction of that signal. Reconstruction is done by some algorithms. My doubt is how to compare of that two signal to show that reconstructed signal has approximately same as original signal.

채택된 답변

Hugo
Hugo 2014년 5월 24일
The comparison can be done in several different ways. Suppose that X is the original signal and that XR is its reconstruction. You can compare them by calculating
mean( (X(:)-XR(:)).^2)
which represents the mean of the squared differences between both signals. This quantity will be zero only if both signals are exactly the same.
You could also calculate
mean( (X(:)-XR(:)).^2) / mean( (X(:).^2 )
which will give you an idea on the size of the differences between the two signals compared to the variance of the original signal.
You may well be interested in other ways of measuring the reconstruction error as well. The possibilities are too vast depending on what the signal is about. You can read more about this by looking for words like "reconstruction error" and "distance measures" in google. Any book about pattern recognition will provide you with good material too.
Hope this helps.
  댓글 수: 1
Tinkul
Tinkul 2014년 5월 24일
thank you..

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

추가 답변 (1개)

Image Analyst
Image Analyst 2014년 5월 24일
If they're images or 2D arrays, you can use psnr() or ssim() (both are now in the Image Processing Toolbox). Check wikipedia for definitions. I have a manual method for psnr and MSE if you need it. You could also use SAD or MAD (sum or mean of absolute differences).
  댓글 수: 2
Tinkul
Tinkul 2014년 5월 24일
no sir, signal is 1D signal...
Image Analyst
Image Analyst 2014년 5월 24일
Well psnr, MSE, MAD, and SAD all work for 1D signals. Try them. They have different uses. For example the MSE (Hugo's answer) really blows up for big outliers, while MAD doesn't so much. And there are others that are really a lot better behaved in the presence of outliers like Median Absolute Deviation http://en.wikipedia.org/wiki/Median_absolute_deviation

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

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by