Nonlinear Optimization problem in Matlab
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Talal Alharbi
el 7 de Mzo. de 2019
Comentada: Talal Alharbi
el 14 de Abr. de 2019
Hi
I hve problem when I use x(0) in nonlinear constraint in my code and I have to start with x(0)!.
Please, Could any one solve this issue. I have to solve it to find the lower and upper bounds.


THE ERROR:

12 comentarios
Respuesta aceptada
David Wilson
el 10 de Abr. de 2019
Are you confusing x0, the start guess with x(0), which does not exist. In your constraint, you write x(0). If that is really what you want, then you need to roll your indices on by one. But somehow I doubt it. If you hadpasted your code, I'd have taken a look at it.
3 comentarios
Walter Roberson
el 14 de Abr. de 2019
You assign the output of the first fmincon() call to a pair of variables named x and fmincon . When you do that, fmincon becomes a numeric scalar instead of a function, and the [x,fval] = fmincon(etc) that you have becomes a request to index into the scalar named fmincon and somehow return two different variables from that, which is not possible from an indexing operation.
Más respuestas (0)
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

