%% Use Identical Fit Options in Multiple Fits
% Modifying the default fit options object is useful when you want to set the Normalize, Exclude, or Weights properties, and then fit your data using the same options with different fitting methods. For example, the following uses the same fit options to fit different library model types.

load census
options = fitoptions;
options.Normalize = 'on';
f1 = fit(cdate,pop,'poly3',options);
f2 = fit(cdate,pop,'exp1',options);
f3 = fit(cdate,pop,'cubicspline',options)

% Copyright 2012 The MathWorks, Inc.