Differentiation help with polynomial
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen

Here is what I have so far im not sure if it is entirely correct but im having trouble comparing the data to see how close they come to each other
yest=[1147 777 479 253 99 17 7 69 203 409 687];%estimated y values using slopes between points
y=polyval(polyder([12 -5 0 3]),[-5:5]);
x=[-5:5];
figure(1);
subplot(1,2,1);
bar(x,y)
title('Y Calculated')
subplot(1,2,2)
bar(x,yest)
title('Y Estimated')
Antworten (1)
Star Strider
am 3 Apr. 2019
Since ‘y’ and ‘yest’ have the same number of elements, I would just subtract them (assuming they are with respect to the same (‘x’ values).
Two possibilities:
dydx_dif = y - yest; % Absolute Difference
dydx_dif = (y - yest)./y; % Relative Difference
Others certainly exist, such as the squares of the differences, the square root of the squares of the differences, and aggregate statistics based on those calculations, such as root-mean-square error for all of them.
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!