Error in interp1 (line 186) F = griddedInterpolant(X,V,method);
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello everyone,
I am using interp1 function, in MATLAB R2015a, to interpolate lift and drag coefficients. These coefficients are given in function of the angle of attack.
The angle of attack in the original excel file are sorted in ascending order. However, i am getting the following error:
Error using griddedInterpolant
The grid vectors are not strictly monotonic increasing.
Error in interp1 (line 186)
F = griddedInterpolant(X,V,method);
Please could anyone explain to me where the problem although the angles of attack are sorted and how to fix it?
Best Regards
0 Commenti
Risposta accettata
Steven Lord
il 6 Mar 2023
although the angles of attack are sorted
Have you confirmed that this is true or are you just assuming that this is true? Call issorted on the first input to interp1 and confirm that this is true.
My guess is that at some point the angle data crosses from say 359 degrees to 1 degree (or the equivalent in radians.) In that case the unwrap function may be of use to you.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!