Interpolating data from a table
68 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Cris LaPierre
2020 年 11 月 12 日
編集済み: Cris LaPierre
2020 年 11 月 12 日
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)
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!