When fitting a piecewise function with fitfun, The error, "Error: Illegal request for real part of scalar - this is bug!" is produced. So I submitted it with the function that I was trying to fit.
I think the error comes if I fit a function in the form of f(x) and put in non uniform parameters for x. Always increasing but not with uniform spacing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
function that cause fitfun to produce error
I think the error comes if I fit a function in the form of f(x) and put in non uniform parameters for x. Always increasing but not with uniform spacing.