0
votes

I'm using Matlab Curve Fitting Tool in order to fit a set of data (with x ranging from 1 to 3 and y ranging from 1 to 0) with the following custom equation:

y = a*((b-x)/b)^c

I get the following error and I can't figure why:

Complex value computed by model function, fitting cannot continue. Try using or tightening upper and lower bounds on coefficients.

I tried with tuning the bounds and starting values of coefficients but nothing. It looks like the problem is somehow given by the power ^c (without it, it works).

Any help would be much, much appreciated!

1

1 Answers

0
votes

It seems like you are getting negative values for

(b-x)/b

Set the bounds for b so that it cannot get smaller than x. (b has to be equal or larger than 3).