Having problems with my function code iterating an initial guess (optimization)

Hello people,
Im having problems trying to iterate from an initial guess.
On my function file i got a function FRes
function R=FRes(guess,~,~,~,~,~)
R=(1./(Tk.^alpha-g))-((beta*alpha*g.^(alpha-1))./((g.^alpha)-gg));
Where my guess is included in the "g" and the "gg" variable.
So i created this code trying to optimize:
It=@(guess)FRes(guess,alpha,beta); (which i think says, on the FRes function the thing u gonna change is "guess".
Then I try doing fminsearch/fzero on (It,guess) on (FRes,guess) on (R,guess) but im not having any luck.
Thanks in advance for your time.

Answers (1)

Sorry, I do not understand what you are asking.
Perhaps you can include your entire function call, such as
x = fzero(fcn1,x0)
and also include the MATLAB output. Then perhaps I will understand.
Alan Weiss
MATLAB mathematical toolbox documentation

Asked:

on 4 May 2012

Community Treasure Hunt

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

Start Hunting!