Compute error between two graphs, each graph contains point data forming multiple curves.
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
Sulaymon Eshkabilov
am 8 Jan. 2023
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
0 Kommentare
Siehe auch
Kategorien
Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



