Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!u6g2000yqh.googlegroups.com!not-for-mail
From: "Marcus M. Edvall" <edvall@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: MATLAB PROBLEM
Date: Sun, 5 Sep 2010 14:47:32 -0700 (PDT)
Organization: http://groups.google.com
Lines: 35
Message-ID: <c160566d-58f1-44cc-b85b-2317c5c1bbc3@u6g2000yqh.googlegroups.com>
References: <i602m1$3v$1@fred.mathworks.com>
NNTP-Posting-Host: 190.141.197.6
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1283723253 9739 127.0.0.1 (5 Sep 2010 21:47:33 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 5 Sep 2010 21:47:33 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: u6g2000yqh.googlegroups.com; posting-host=190.141.197.6; posting-account=QzH06woAAACI9Djndq4ekTlPrC0dZLVS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1;
 Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30;
 .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR
 3.5.30729; .NET4.0C; .NET4.0E),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:667813

Hi Ma'mon,

Try the attached code with TOMLAB:

x = tom('x',6,1);

resid = [(x(1)^2)+74.201-(-17.228*x(1))+(x(2)^2)+5.341-(4.622*x(2))+
(x(3)^2)+165.431-(25.724*x(3))-1398.760;
(x(4)^2)+74.201-(-17.228*x(4))+(x(5)^2)+5.341-(4.622*x(5))+
(x(6)^2)+165.431-(25.724*x(6))-750.760;
(x(1)^2)+32.217-(-11.352*x(1))+(x(2)^2)+49.323-(-14.046*x(2))+
(x(3)^2)+341.289-(36.948*x(3))-858.490;
(x(4)^2)+32.217-(-11.352*x(4))+(x(5)^2)+49.323-(-14.046*x(5))+
(x(6)^2)+341.289-(36.948*x(6))-327.610;
(x(1)^2)+13.542-(7.360*x(1))+(x(2)^2)+68.013-(16.494*x(2))+
(x(3)^2)+45.239-(13.452*x(3))-1608.010;
(x(4)^2)+13.542-(7.360*x(4))+(x(5)^2)+68.013-(16.494*x(5))+
(x(6)^2)+45.239-(13.452*x(6))-912.040;
x(1)^2-(2*x(1)*x(4))+x(4)^2+x(2)^2-(2*x(2)*x(5))+x(5)^2+x(3)^2-
(2*x(3)*x(6))+x(6)^2-224.101];

x0 = [1; 1; 1; 1; 1; 1];

options = struct;
options.norm = 'L2';
options.type = 'cls';
Prob = sym2prob(resid,[],{x == x0},options);
Prob.LS.y = zeros(7,1);
Result = tomRun('multiMin', Prob, 1);

Best wishes, Marcus
Tomlab Optimization Inc.
http://tomopt.com/
http://tomsym.com/