MATLAB: Lsqcurvefi problem on Mac OS

lsqcurvefit mac

I am trying to do a nonlinear fit to a function using lsqcurvefit. While everything works fine in a windows-based computer, on the mac I get a "Dimensions of matrices being concatenated are not consistent". Is this a known problem?

Best Answer

The line "plotStr = [colors(1+mod(ind-1, length(colors))) plotOpt];" is not part of the code of /Applications/MATLAB_R2016a.app/toolbox/shared/optimlib/color.m
I suspect you have your own routine named color.m that is earlier on the path than the built-in routine. Use
which -all color
to find it.
Related Question