Effacer les filtres
Effacer les filtres

Finding when spline interpolated data is equal to a number

3 vues (au cours des 30 derniers jours)
Nathan Mu
Nathan Mu le 12 Avr 2022
Modifié(e) : Stephen23 le 12 Avr 2022
Hello, how would you determine when spline interpolated data is equal to some number, e.g. 3?
Thanks!

Réponse acceptée

Stephen23
Stephen23 le 12 Avr 2022
Modifié(e) : Stephen23 le 12 Avr 2022
X = [1,2,3];
Y = [1,2,4];
Yq = 3;
pp = spline(X,Y);
fh = @(xq)ppval(pp,xq)-Yq;
Xq = fzero(fh,[1,4])
Xq = 2.5616
plot(X,Y,'+',Xq,Yq,'*')

Plus de réponses (0)

Catégories

En savoir plus sur Interpolation dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by