finding point on a function

I have a function P using polyfit. How can I find the corrdinate on P when x=a?

Respuestas (2)

Ameer Hamza
Ameer Hamza el 9 de Dic. de 2020

1 voto

You can use polyval()
xv; % x data-points
yv; % y data-points
p = polyfit(xv, yv, 3);
x = a;
y = polyval(p, x);
KSSV
KSSV el 9 de Dic. de 2020

0 votos

Read about interp1.
Let (x,y) be your data.
xi = a ;
yi = interp1(x,y,xi) ;
[xi yi]

Productos

Preguntada:

el 9 de Dic. de 2020

Respondida:

el 9 de Dic. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by