18、补充下列matlab程序,用函数lsqcurvefit拟合y=c*(1-e^(-d*x))中的参数c,d。 1)编写M-文件 curvefun2.m function f=curvefun2(a,xdata) f=(); %其中a(1)=c, a(2)=d 2)输入命令 xdata=[3 4 5 7 9 15]; ydata=[1 2 4 6 8 10]; a0=[1 1]; a=lsqcurvefit ('curvefun2',a0,xdata,ydata); f= curvefun2(a,tdata);

时间:2024-05-03 13:18:52

相似题目