hoe to estimate the coefficients from curve fitting?
1 次查看(过去 30 天)
显示 更早的评论
I have 467 number of signal and each one is representing gaussian distribution. Matrix size is 63 by 467. I want to find out the coefficients for distribution by fitting 'gauss3'. I want to do this only by writing code not by toolbox. But I am unablae to to do this. Kindly help me regarding this.
clc;
clear all;
close all;
load amp_02_01A_compressed.dat;
load tt_02.dat;
t=tt_02(1:63,1); % time
am=amp_02_01A_compressed; % amplitude
am=am';
for i=1:63
for j=1:467
am_norm(i,j)=(am(i,j)/(max(am(j))));
curvefit=fit(t(i,1).',am_norm(i,j).','gauss3');
end
end
1 个评论
Walter Roberson
2019-6-26
Fitting sum of gaussians is difficult to get right. It is much more common than not that you will get wrong answers unless you start very close to the right parameters. You should research techniques for fitting sum of gaussians specifically, instead of writing general curve fitting code.
回答(0 个)
另请参阅
类别
在 Help Center 和 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!