Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Interpolation based on data points
1 回表示 (過去 30 日間)
古いコメントを表示
I wanted to do the derivative of the density based on the data below . My code returns only the
last value. I don't know why. Besdies I am not sure wether I have done it correctly. Thanks for the help.
function [rho, N]=density(z)
zval= [2 3 5 7 10 15 20 25];
rho1 = [17.2731684 17.1649375 21.43455647 22.4140625 23.86332207 24.3746967 24.70487685 24.6003125];
zvala=400-zval;
zvalue=fliplr(zvala);
rho2=fliplr(rho1);
rho3=smoothdata(rho2,'lowess',6);
rho=interp1(zvalue,rho3,z);
rho4=interp1(zvalue,rho3,z+0.1);
N=rho4-rho % drho /dz
end
0 件のコメント
回答 (0 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!