Having problems with my function code iterating an initial guess (optimization)
Afficher commentaires plus anciens
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.
Réponses (1)
Alan Weiss
le 7 Mai 2012
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
Catégories
En savoir plus sur Choose a Solver dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!