MATLAB CURVE FITTING TOOLBOX - RELEASE NOTES Guide de l'utilisateur Page 187

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 216
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 186
fitoptions
4-111
You can return values for some fit options with the fit function. For example,
fit the census data using a smoothing spline and return the default smoothing
parameter. Note that this value is based on the data passed to
fit.
[f,gof,out] = fit(cdate,pop,'smooth');
smoothparam = out.p
smoothparam =
0.0089
Increase the default smoothing parameter by about 10% and fit again.
opts = fitoptions('Method','Smooth','SmoothingParam',0.0098);
[f,gof,out] = fit(cdate,pop,'smooth',opts);
Create two noisy Gaussian peaks one with a small width, and one with a
large width.
a1 = 15; b1 = 3; c1 = 0.02;
a2 = 35; b2 = 7.5; c2 = 4;
x = (1:0.01:10)';
rand('state',0)
gdata = a1*exp(-((x-b1)/c1).^2) + a2*exp(-((x-b2)/c2).^2) ...
+ 5*(rand(size(x))-.5);
Fit the data using the two-term Gaussian library model.
ftype = fittype('gauss2');
gfit = fit(x,gdata,ftype);
Maximum number of function evaluations exceeded. Increasing
MaxFunEvals (in fit options) may allow for a better fit, or
the current equation may not be a good model for the data.
Because the Display property is set to its default value Notify, a message is
included as part of the display due to the fit not converging. The message
indicates that you should try increasing the number of function evaluations.
Vue de la page 186
1 2 ... 182 183 184 185 186 187 188 189 190 191 192 ... 215 216

Commentaires sur ces manuels

Pas de commentaire