How can I write a script for a default fit option for a gaussian fit?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to make a custom fit for my data using the Gaussian fit, but how do I go about setting that up. Currently I have this script:
ft = fittype( 'gauss1' );
opts = fitoptions( 'Method', 'LinearLeastSquares' );
opts.Lower = [-Inf -Inf -Inf];
opts.Upper = [Inf Inf Inf];
[fitresult, gof] = fit(xData, yData, ft, opts );
When I enter "opts.MaxInter = (600);" it gives me an error and does not include it in my fit options. How can I set up the MaxInter, and the other values that are in the fit options in my script. I appreciate any help!!
2 Commenti
Risposte (1)
Image Analyst
il 16 Feb 2018
See attached demo to fit a Gaussian shape to some noisy data that roughly traces out a Gaussian shape.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/179048/image.png)
0 Commenti
Vedere anche
Categorie
Scopri di più su Linear and Nonlinear Regression in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!