How to insert square terms in constraints for fmincon

2 views (last 30 days)
Hello together,
I want to solve a non-linear model with fmincon. Now some restrictions are squares like x(1)^2 + 2x(2)^2 <=540. How is the correct way to write them in A? A = [1^2 2^2] seems to be the wrong solution.
Could you please give me support?

Accepted Answer

Torsten
Torsten on 8 Nov 2018
You must use function "nonlcon" for this.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!