How to setup upper and lower boundaries depending on guess in lsqnonlin function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Manuela Gräfe
am 10 Mai 2017
Beantwortet: John D'Errico
am 10 Mai 2017
Hello,
how can I setup the upper and lower boundaries depending on the guessed values for each iteration?
I want to realize thing like: c > 0
lb = [0, 0, a];
ub = [10, 10, 10];
x0 = [a, b, c];
x = lsqnonlin(fun,x0,lb,ub)
Thank you!
0 Kommentare
Akzeptierte Antwort
John D'Errico
am 10 Mai 2017
I think you misunderstand how these tools work, and the meaning of a boundary.
The bounds (lb and ub) are fixed, whatever you set them at the start. They cannot change for each iteration, based on your whim, or on the weather outside.
Next, you cannot have a constraint like c>0. You can only have a constraint of the form c>=0, and even that may be violated by a tiny amount (TolCon).
Perhaps you meant something else. If so, then you need to explain your question far more clearly.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!