What should be the plot command?

조회 수: 9 (최근 30일)
Priya
Priya 2014년 1월 30일
댓글: Priya 2014년 1월 30일
deltaSignal = abs(testSignal - referenceSignal);
percentageDifference = deltaSignal ./ referenceSignal; % Percent by element.
meanPctDiff = mean(percentageDifference); % Average percentage over all elements
If you can please tell me how does the plot command looks like for the code above.
  댓글 수: 1
Mischa Kim
Mischa Kim 2014년 1월 30일
What exactly do you want to plot and how?

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

채택된 답변

Walter Roberson
Walter Roberson 2014년 1월 30일
plot([deltaSignal(:), percentageDifference(:)])
However, it is likely that the two are on fairly different scales, so you probably want something more like
Fs = 44100; %sampling frequency. Example value.
t = (0 : length(deltaSignal) - 1) ./ Fs;
plotyy(t, deltaSignal, 'b', t, 100 * percentageDifference, 'gp');

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2014년 1월 30일
Read the documentation about plot
doc plot
Look at this example
t=0:0.01:10
y1=sin(t)
y2=cos(t)
plot(t,y1,t,y2)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by