Path: news.mathworks.com!not-for-mail From: "Kittithad Wangveerathananon" <kittithad@startfromyou.com> Newsgroups: comp.soft-sys.matlab Subject: suppose I have an equation x^2+x+y^2+3*y=5*y^2+3*y+3*x*y+5 and I want to find the set of (x,y) that satisfy the equation. Date: Thu, 12 Aug 2010 13:02:06 +0000 (UTC) Organization: Thammasat University Lines: 14 Message-ID: <i40rce$qur$1@fred.mathworks.com> Reply-To: "Kittithad Wangveerathananon" <kittithad@startfromyou.com> NNTP-Posting-Host: webapp-05-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1281618126 27611 172.30.248.35 (12 Aug 2010 13:02:06 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Thu, 12 Aug 2010 13:02:06 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 2441323 Xref: news.mathworks.com comp.soft-sys.matlab:661383 Question How can i do that? I've been trying, solve, explot and subs. I can get the graph, but i cannot get the (x,y) pairs that I want. When I use function solve to solve the equation in term of x or y and then substitute the numeric value for one of them to find the other, I got the problem about complex numer. This might be because that numeric value that I substitute is not the number that satisfy the equation, so the program give me the result in complex number. Background. I need to use the pairs to find the optimal value of my objective function. I tried to use the fmincon, but it gave me the optimal value that is not reliable, so i try to do it manually. Note that my equality constraint is in the form of the equation in the subject. I also have a couple of inequality constraints. Thanks in advance