i have function L and initial values phi1 ,phi2 and seta . I want to be derivative this function and equal it by zero for getting the estimated values of these initial values. but showing the next error .what to do?

1 view (last 30 days)
syms phi1 phi2 seta
L=- ((38*phi1)/281 - (89*phi2)/902 + (149*seta)/1124 - 83/28)^2/8; % function
phi1=0.3; % initial point
phi2=0.5; % initial point
seta=0.4; % initial point
phi1hat=fzero(L,phi1);
phi2hat=fzero(L,phi2);
setahat=fzero(L,seta);
Error using fzero (line 167)
If FUN is a MATLAB object, it must have an feval method.
  3 Comments
mohammed elmenshawy
mohammed elmenshawy on 24 Dec 2016
A summary of what I want to do . i have function of 3 parameters L=f(phi1,phi2,seta). i need differential this function with respect to phi1 , phi2 and seta , and equality to zero. Hence we get three equations in three parameters , Give initial values of the three parameters.In the first equation, which is where the differentiation for phi1 we substitute only about phi2 and seta to get phi1 value . By this logic with the phi2 and seta . what to do ?
John D'Errico
John D'Errico on 27 Dec 2016
Edited: John D'Errico on 27 Dec 2016
Note that you were trying to solve a 3-dimensional problem, by calling fzero, a 1-d solver, three times. Sorry, but that makes no sense. Use fsolve preferentially, or lacking that, you can use fminsearch if used properly.

Sign in to comment.

Answers (0)

Categories

Find more on Systems of Nonlinear Equations in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!