lsqcurvefit在matlab中拟合多元函数问题clc;clear;cc=zeros(1);f=inline('cc(1)*x.^2','cc','x'); loadh1=[0,0.1,0,2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1];loadp1=[loadh1(1)^2*5,loadh1(2)^2*5,loadh1(3)^2*5,loadh1(4)^2*5,loadh1(5)^2*5,loadh1(6)^2*5,loadh1(
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/24 05:12:03
lsqcurvefit在matlab中拟合多元函数问题clc;clear;cc=zeros(1);f=inline('cc(1)*x.^2','cc','x'); loadh1=[0,0.1,0,2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1];loadp1=[loadh1(1)^2*5,loadh1(2)^2*5,loadh1(3)^2*5,loadh1(4)^2*5,loadh1(5)^2*5,loadh1(6)^2*5,loadh1(
lsqcurvefit在matlab中拟合多元函数问题
clc;clear;
cc=zeros(1);
f=inline('cc(1)*x.^2','cc','x');
loadh1=[0,0.1,0,2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1];
loadp1=[loadh1(1)^2*5,loadh1(2)^2*5,loadh1(3)^2*5,loadh1(4)^2*5,loadh1(5)^2*5,loadh1(6)^2*5,loadh1(7)^2*5,loadh1(8)^2*5,loadh1(9)^2*5,];
[c1,resc1]=lsqcurvefit('f',1,loadh1,loadp1);
c1
%%%% 总是报错,应该是拟合函数形式写错了,我也不知道错在哪里.
lsqcurvefit在matlab中拟合多元函数问题clc;clear;cc=zeros(1);f=inline('cc(1)*x.^2','cc','x'); loadh1=[0,0.1,0,2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1];loadp1=[loadh1(1)^2*5,loadh1(2)^2*5,loadh1(3)^2*5,loadh1(4)^2*5,loadh1(5)^2*5,loadh1(6)^2*5,loadh1(
clc;clear;
f=inline('cc(1)*x.^2','cc','x');
loadh1=[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8];
loadp1=[loadh1(1)^2*5,loadh1(2)^2*5,loadh1(3)^2*5,loadh1(4)^2*5,loadh1(5)^2*5,loadh1(6)^2*5,loadh1(7)^2*5,loadh1(8)^2*5,loadh1(9)^2*5];
[c1,resc1]=lsqcurvefit(f,zeros(1),loadh1,loadp1);
c1