Differentiation help with polynomial
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示

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')
0 件のコメント
回答 (1 件)
Star Strider
2019 年 4 月 3 日
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.
0 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!