How to use fit matrix array
显示 更早的评论
A=csvread('spotlightmtfx.txt');
h=A(:,1);
j=A(:,2);
f=fit(h, j,'gauss2')
%Coefficients
a1=1.47 %(1.426, 1.515)
b1=897.7 %(897,898.3)
c1=27.08 %(26.08 27.08)
a2=0.6994 %(0.6821, 0.7167)
b2=810.8 %(790, 831.7)
c2=592.9 %(501, 685.7)
%f=
%General model Gauss2:
f(h)=a1*exp(-((h-b1)/c1).^2)+a2*exp(-((h-b2)/c2).^2)
plot(f,h,j)
This is my code and it is not work."Cannot use cellarray brackets or parens to assign to FIT." What I have to do? Please help me. :)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!