Using Matlab to realize known data fitting

Known data fitting using Matlab achieve
a large amount of data and the known basic equation, coefficients but does not know at this time can use the following code to implement

clear all;
clc;
close all;

x=[426;514;645;739;1000;1100;1170;1250;1370;1520;1540;1650;1720;1750;2010;2210;2300;2540;2720;2850;3000;3150];

y=[3609;3577;3517;3481;3442;3451;3440;3437;3419;3404;3397;3395;3383;3399;3409;3362;3368;3353;3335;3348;3371;3355];

p=fittype('a*x.^-1+c','independent','x')
f=fit(x,y,p)
plot(f,x,y);

Guess you like

Origin blog.csdn.net/u012323667/article/details/79470197