Gaussian fiting
이전 댓글 표시
Hello,
I have (X,Y) data and i want to fit this data with a Gaussian. Basically i use 'lsqnonlin' which works fine (if the initial solution X0 is not too bad).
I just have two questions because i don't have a lot of experience with Matlab:
1/ lsqnonlin seems to be an appropriate method (Gaussian = non linear (mu,sigma)) but i find a tool in mathwork which use polyfit ? Do you think Polyfit or other methods would be better than lsqnonlin (regarding to the stability of the final solution and the importance of the initial solution).
2/ I use the folowing definition for Gaussian :
G = A * 1/(sigma*sqrt(2*pi)) * exp(-(1/2)*(X-mu/sigma).^2) + C;
A,mu sigma and C are the variable to estimate.
This allow me to obtain sigma directly. Do you think it's the best way to "express" the Gaussian ?
Thank you very much for your help
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Spline Postprocessing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!