Curve Fitting of Data Points

2 次查看(过去 30 天)
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?

采纳的回答

Star Strider
Star Strider 2016-12-24
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by