필터 지우기
필터 지우기

How to plot the error between two signals?

조회 수: 5 (최근 30일)
afef
afef 2017년 9월 25일
댓글: afef 2017년 9월 27일
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
Walter Roberson
Walter Roberson 2017년 9월 25일
plot(x-a) ?
afef
afef 2017년 9월 25일
Ok i will try it .

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

채택된 답변

KSSV
KSSV 2017년 9월 26일
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
Walter Roberson
Walter Roberson 2017년 9월 26일
편집: Walter Roberson 2017년 9월 26일
KSSV needed some data for illustration purposes, so he created a range of x from 1 to 10, and created one line as 2*x and a second line as 3.5 * x. In your actual code you would replaces those three lines with your own data.
afef
afef 2017년 9월 27일
Ok i understand now.thanks

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Digital and Analog Filters에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by