Compute error between two graphs, each graph contains point data forming multiple curves.

4 ビュー (過去 30 日間)
Cardim
Cardim 2023 年 1 月 8 日
コメント済み: Matt J 2023 年 1 月 20 日
I have a experimental x-y data which forms multiple intersecting and non-intersecting curves. I then have another x-y data which comes from simulation containing similar x-y data. How to I compute the error between those two graph. In the end, I want to match the experimental x-y data with the simulation x-y data.
  5 件のコメント
Cardim
Cardim 2023 年 1 月 19 日
FYI: The data cannot be upsampled or downsampled as the dataset length varies for eah dataset
Matt J
Matt J 2023 年 1 月 20 日
Very well, then please comment on one or both of the answers below.

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

回答 (2 件)

Matt J
Matt J 2023 年 1 月 8 日
編集済み: Matt J 2023 年 1 月 8 日
You can use pdist2,
Error=vecnorm( pdist2([x1,y1] ,[x2,y2],'euc','Smallest',1) )

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 1 月 8 日
There are a few ways to do it.
x=linspace(0, 2*pi);
f = 3.5*sin(2*x); % Fit model
y = f+randn(size(x)); % Experimental data
scatter(x,y), hold on
plot(x,f, 'k-'), grid on
df = abs(f)-abs(y); % The difference (Error)
figure
plot(1:numel(x), df)
title('Error')
ylabel('Error')
xlabel('Data orders')
grid on

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by