Filter löschen
Filter löschen

Curve Fitting of Data Points

2 Ansichten (letzte 30 Tage)
Anas Rao
Anas Rao am 24 Dez. 2016
Beantwortet: Star Strider am 24 Dez. 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?

Akzeptierte Antwort

Star Strider
Star Strider am 24 Dez. 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

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by