How to plot the error between two signals?

21 views (last 30 days)
afef
afef on 25 Sep 2017
Commented: afef on 27 Sep 2017
I did the filtering of an EEG signal using fir filter then i implement this fiter in c langage. Now i need to plot the error between the to filter but i don't know how to do that. Can anyone help me please.
  6 Comments

Sign in to comment.

Accepted Answer

KSSV
KSSV on 26 Sep 2017
x = 1:10;
y1 = 2*x;
y2 = 3.5*x;
% error
dy = y2-y1 ;
% Multiple plot commands, with "hold" on
figure
hold on
plot(x,y1,'r');
plot(x,y2,'b');
plot(x,dy,'g');
%
legend('Signal1','Signal2','error')
  3 Comments
afef
afef on 27 Sep 2017
Ok i understand now.thanks

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by