Hi experts,
I am using fzero command to solve a nonlinear equation. The function part is as the following, where x is the variable to be solved, e is a variable value that passed to the function (e is a vector, I have a loop outside the nonlinear function for that), and others are parameters:
function F = solvex(x,e)global alpha eta delta w r mu chiF= x - w^(-alpha/(1-eta)).*(r+mu*(1-chi*exp(x))).^((alpha*eta-1)/(1-eta)).*exp(e);end
I got the following error message under some parameter values and e values:
Exiting fzero: aborting search for an interval containing a sign change because complex function value encountered during search.
I checked some answers in mathworks and it seems that because the A^B operator in matlab.
I am looking forward to figuring out the solution. Thank you very much
Best Answer