Matlab 解决下列数据的拟合,求过程、图像、函数表达式,x=1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010y=566,632,74
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/18 16:30:42
Matlab 解决下列数据的拟合,求过程、图像、函数表达式,x=1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010y=566,632,74
Matlab 解决下列数据的拟合,求过程、图像、函数表达式,
x=1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010
y=566,632,745,755,769,789,985,1110,1313,1428,1782,1920,2150,2292,2601,3149,4338,5145,5809,6241,6854,7656,8772,10007,11374,12567,14332,16614,19228,22844,26404,29688,32074
求此式的三次拟合过程、表达式和图像!
Matlab 解决下列数据的拟合,求过程、图像、函数表达式,x=1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010y=566,632,74
x=[0.1527 7.4679 4.4510 9.3181 4.6599 4.1865 8.4622 5.2515 2.0265 6.7214];
y=[8.3812 0.1964 6.8128 3.7948 8.3180 5.0281 7.0947 4.2889 3.0462 1.8965];
z=[8.5979 56.6475 26.9266 91.1643 30.1839 23.2528 79.0822 32.7274 8.0064 47.6670];
%只要这样写就可以了
f=@(p,x)(p(1)*x(1,:).^2+p(2)*x(2,:));
p=lsqcurvefit(f,rand(1,2),[x;y],z)%p=[a b]