hoe to estimate the coefficients from curve fitting?
1 view (last 30 days)
Show older comments
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 Comment
Walter Roberson
on 26 Jun 2019
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.
Answers (0)
See Also
Categories
Find more on Linear and Nonlinear Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!