Show diference between two signals

Hi, I have a telephone number save in a structure. This number is the correct number. In other structure i have a telephone number send and i want to compare the structures and show where the signals are diferent, i don`t want to show the complet signals, i want to show only the error if they are not equal.
Thanks

댓글 수: 6

Paulo Silva
Paulo Silva 2011년 7월 11일
please provide one example of the data you want to compare
andoni
andoni 2011년 7월 11일
I get the tones obtained from a DTMF reciver and i compare with tones i generate. This tones i save in a structure that have:
time: <32801x1 double>
signals: <1x1 struct>
blockName: DTMFgenerator
is this what you want?
sorry about my english..
Paulo Silva
Paulo Silva 2011년 7월 11일
almost there, now please see what's inside signals
andoni
andoni 2011년 7월 12일
inside there are 5 fields:
values: <28884x1 double> inside this--> 0
6
5
dimensions: 1
label
title
plotstyle 1
Paulo Silva
Paulo Silva 2011년 7월 12일
The part you are interested in is the values vector but it shouldn't be 0 like you say, try
plot(signals.values)
and see what appears.
andoni
andoni 2011년 7월 12일
Thanks I know that. I had badly explained.
What i want is compare the values of that structure with another one and when the values are diferent show a message that indicates that has been a error.

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

 채택된 답변

Paulo Silva
Paulo Silva 2011년 7월 12일

1 개 추천

Do something similar to this
a=[0 5 6 7 8]
b=[0 5 6 8 8]
if any(~(a==b)) %if any index is diferent show error
disp('The signals aren't equal')
end
a and b are diferent signals like the example you provided (ie. a=signals.values)

댓글 수: 2

andoni
andoni 2011년 7월 12일
Thanks!!
andoni
andoni 2011년 7월 12일
and now do you know how to say in what index is the diference?

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

추가 답변 (0개)

태그

질문:

2011년 7월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by