Show diference between two signals

1 Ansicht (letzte 30 Tage)
andoni
andoni am 11 Jul. 2011
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 Kommentare
Paulo Silva
Paulo Silva am 12 Jul. 2011
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 am 12 Jul. 2011
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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Paulo Silva
Paulo Silva am 12 Jul. 2011
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 Kommentare
andoni
andoni am 12 Jul. 2011
Thanks!!
andoni
andoni am 12 Jul. 2011
and now do you know how to say in what index is the diference?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by