フィルターのクリア

How to compute the percentage of difference between two plots?

78 ビュー (過去 30 日間)
Priya
Priya 2014 年 1 月 30 日
コメント済み: Image Analyst 2018 年 9 月 12 日
Hi, Could anyone please tell me how to calcute the percentage of difference between two plots? Actually I'm trying to see if there is any model error between two plots or in other words, how much they deviate from each other.
I have come across some functions like rms, R-square fit etc. But I don't have any idea on using them. Please help me with this.

採用された回答

Image Analyst
Image Analyst 2014 年 1 月 30 日
What's wrong with the obvious:
deltaSignal = abs(testSignal - referenceSignal);
percentageDifference = deltaSignal ./ referenceSignal; % Percent by element.
meanPctDiff = mean(percentageDifference); % Average percentage over all elements.
  9 件のコメント
metehan yayla
metehan yayla 2018 年 9 月 12 日
What if the "referenceSignal" is zero at some element(s)? Then, percentageDifference will be infinity which results in infinite meanPctDiff.
Image Analyst
Image Analyst 2018 年 9 月 12 日
Correct.

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

その他の回答 (1 件)

Daniel Simmons
Daniel Simmons 2015 年 2 月 25 日
To get the error between the 2 plots, you can use the compare the raw data using the relError function found at <http://uk.mathworks.com/matlabcentral/fileexchange/47834-relerror-m>

カテゴリ

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