[2x1^2+2x1​x2+x2^2-10​x1-10x2]

1. Use MATLAB Optimization Tool to solve the following problem: minimize [2x1^2+2x1x2+x2^2-10x1-10x2]
subject to [x1^2+x2^2≤500] and [5x1-x2 ≤ -4] .
2. Please hand-check all the Kuhn-Tucker conditions for your answer.
I tried to do it but it keeps giving me error message: Error: The expression to the left of the equals sign is not a valid target for an assignment. Error in bineq: Error: Unexpected MATLAB expression. Error in lb: Undefined function or variable 'L'.

2 Comments

Well, there is an error in your code. We can't guess what you wrote, so show us your code.
----> this is what i am getting <----

Sign in to comment.

Answers (1)

Guillaume
Guillaume on 13 Dec 2015
Assuming that 2x1^2+2x1x2+x2^2-10x1-10x2 actually means 2*x1^2 + 2*x1*x2 + x2^2 - 10*x1 - 10*x2, multiplication signs are not optional. Otherwise, I've no idea what your equation mean.

5 Comments

Its not multiplication signs its X symbol
If x does not mean a variable but instead means the x multiplication symbol, then things like "+x2^2" don't make sense. The multiplication symbol in MATLAB is *, not × like you might find in some papers or textbooks. If x1 and x2 are variables, then the equation Guillaume rewrote is the correct way of writing it in MATLAB and then I don't understand your comment at all.
this is the image of the equation
That image is completely unreadable, not even close to being readable.
@jiya, we're covering basic maths here. When you write
2a
It means,
2*a
The multiplication, *, is simply elided. The elision is not optional on a computer.

Sign in to comment.

Categories

Find more on Function Creation in Help Center and File Exchange

Tags

No tags entered yet.

Asked:

on 13 Dec 2015

Commented:

on 13 Dec 2015

Community Treasure Hunt

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

Start Hunting!