How to integrate a modified cfit funciton?
Show older comments
Please find the input variables c (sound speed m/s) and z (depth m) at end. Where sound speed is a function of depth c=c(z) I can get the fitted function f by
figure(1)
f=fit(z,c,'smoothingspline');
plot(f,z,c)
xlabel('Depth z ')
ylabel('Spund Speed C(z)')
I can do the integration from 30m to 50m for instance, which is
integrate(f,30,50);
But how can I modify the fitted function f then integrate like
integrate(sqrt(1./f^2-1/1800^2),30,50);
Is there any means to achieve this? Thank you!!!!!
c= [1532.35812332183;1532.09931142412;1531.55663714730;1531.13879204333;1527.17235792085;1524.06757234096;1520.77750440136;1500.98252643213;1494.68127723941;1490.39364113755;1487.89565341648;1487.62521870344;1495.01065240456;1503.30879683038;1503.53436491052];
z= [2.47551587249922;4.48813040298639;6.50074493347357;7.50705219871715;11.0039567548543;13.3491225832363;15.1491225832363;18.8991225832363;22.6491225832363;26.3991225832363;33.8991225832363;41.3991225832363;56.3991225832363;71.3991225832363;78.5991225832363];
1 Comment
Accepted Answer
More Answers (0)
Categories
Find more on Signal Generation, Analysis, and Preprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!