I have some data that I have binned with the hist function. I am trying to fit a Gaussian function to the histogram data, and I noticed that the parameter c1 of the Gaussian fit in the Curve Fitting App does not correspond to the standard deviation of a Gaussian distribution. I exported my fit and tried calling std on the fit object, but I get the error
Undefined function 'sum' for input arguments of type 'cfit'.
Error in var (line 85)
xbar = sum(x, dim) ./ n;
Error in std (line 31)
y = sqrt(var(varargin{:}));
How can I display the standard deviation of the fit?
Best Answer