FMINUNC cannot continue.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Anyang He
am 7 Apr. 2020
Kommentiert: Walter Roberson
am 7 Apr. 2020
Hi, I'm trying to learning fminunc, but it gives errors: 'Insufficient number of input parameters' and 'Failure in initial user-supplied objective function evaluation. FMINUNC cannot continue.'
The cose is as following. I have saved the function Pun as a separate file.
Help please?
function f = Pun(x,lamda)
f = x(1)^2 + lamda * x(2)^2;
end
x = [0.5;0.5];
lamda = 0.5;
fminunc('Pun',x,lamda)
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Entering Commands finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!