Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Interpolation based on data points
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!