MATLAB: Fitting sum of gaussians into a data set (100 rows and 1 column)

curve fittinggmdistribiution

Getting difficulty in fitting and plotting a data set (100×1 matrix) by using gmdistribution.fit….i have to git a large number of sum of gaussians…but i guess it needs a matrix with mu and sigma values…can anyone help me in fitting this data into sum of gaussians and plotting it..i want a one dimensional plot… thanks

Best Answer

you can use the function "lsqcurvefit".first define Gaussian formula in a function mfile.then the lsqcurvefit function gives the fitted data .