What should be the plot command?

8 ビュー (過去 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 件のコメント
Priya
Priya 2014 年 1 月 30 日
Thanks

サインインしてコメントする。

その他の回答 (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)
  1 件のコメント
Priya
Priya 2014 年 1 月 30 日
Thank you

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by