Finding when spline interpolated data is equal to a number

3 次查看(过去 30 天)
Hello, how would you determine when spline interpolated data is equal to some number, e.g. 3?
Thanks!

采纳的回答

Stephen23
Stephen23 2022-4-12
编辑:Stephen23 2022-4-12
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,'*')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by