Interpolating data from a table
68 views (last 30 days)
Show older comments
Hello,
I'm trying to get the interpolated Cl and Cd from this table. For example, say for -173.2 AOA, I want to find out the corresponding Cl & Cd. The file here is an excel file and I have imported them into matlab and named the variable naca which is the size of 395*4. I have also tried interp1 function to interpolate.
For example,
I tried, interp1(naca.AOA, naca.Cl, -173.2);
The error it gives out is- "Error using griddedInterpolant
The sample points must be finite.
Error in interp1 (line 170)
F = griddedInterpolant(X,V(:,1),method);"
Any help regarding this would be really appreciated.

0 Comments
Answers (1)
Cris LaPierre
on 12 Nov 2020
Edited: Cris LaPierre
on 12 Nov 2020
Works here. Perhaps try clearing your workspace and then rerunning your code.
AOA = (-180:1:-167)';
Cl = sort(rand(size(AOA))-0.15);
Cd = sort(rand(size(AOA)));
naca=table(AOA,Cl,Cd)
interp1(naca.AOA,naca.Cl,-173.2)
See Also
Categories
Find more on Tables 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!