How do I use the ppval, pp and spline in this situation?
Show older comments
I have the following in a code:
pp=spline(diameter,nbdensity);
all(i,j) = ((diameter(i,1)^3)-(diameter(j,1)^3))^(1/3);
finp(i,j) = ppval(pp,all(i,j));
I need to find the interpolated value of "nbdensity" at a given value of "all". How would I express it using the above? Would the following be correct?
nbdensity(i)*finp(i,j)
5 Comments
Ameer Hamza
on 28 Apr 2018
ppval(pp,all(i,j)) IS the interpolated value you are looking for
Sakina
on 28 Apr 2018
Ameer Hamza
on 28 Apr 2018
Yes, this is correct. You can read the explanation in my answer below.
Sakina
on 28 Apr 2018
Ameer Hamza
on 28 Apr 2018
You are welcome.
Accepted Answer
More Answers (0)
Categories
Find more on Interpolation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!