Finding values from Cubicinterp fit
Mostrar comentarios más antiguos
If I have performed a cubic interp to some data,
x = linspace(1,maxFwhm+1,maxFwhm+1)'
f=fit(x,y,'cubicinterp')
hold on
plot(f,'k--')
coeffvalues(f)

How can I now calculate the x value that corresponds with the y value of 0.5?
Thanks Jason
Respuesta aceptada
Más respuestas (1)
John D'Errico
el 13 de En. de 2017
Editada: John D'Errico
el 13 de En. de 2017
Download my SLM Toolbox . Since I don't have your data, I'll make some up. Not a very creative function, I know, but it will suffice.
Here, for which values of x does the function equal 0.5?
x = (0:5)';
y = rand(size(x));
y = rand(size(x))
y =
0.79221
0.95949
0.65574
0.035712
0.84913
0.93399
f=fit(x,y,'cubicinterp');
slmsolve(f.p,0.5)
ans =
2.1967 3.671
The results are as good as can be had (using the function roots), not an approximation.
1 comentario
Jason
el 14 de En. de 2017
Categorías
Más información sobre Time Series en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!