Curve Fitting of Data Points

1 visualización (últimos 30 días)
Anas Rao
Anas Rao el 24 de Dic. de 2016
Respondida: Star Strider el 24 de Dic. de 2016
I have lot of data points. I want to make an equation according to the curve formed. But the equations comes from the curve fitting, when I put again in the equation x-point it is not giving corresponding y-point. I am interested to make such equation in which when I put the x-point it would automatically gives the y-points?

Respuesta aceptada

Star Strider
Star Strider el 24 de Dic. de 2016
This is not parameter estimation (‘curve fitting’) as such, but if you want a way to fit all the points exactly, using the interp1 function with the 'spline' method will work:
N = 50; % Number Of Points
x = 1:N;
y = rand(1, N);
xi = linspace(min(x), max(x), 250);
yi = interp1(x, y, xi, 'spline');
figure(1)
plot(x, y, 'gp')
hold on
plot(xi, yi, '-r')
hold off
grid

Más respuestas (0)

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by