Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: lsqlin- matrix badly scaled
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Saad

Posts: 23
Registered: 11/26/12
lsqlin- matrix badly scaled
Posted: Nov 30, 2012 1:04 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear all,

I would appreciate any comment or help on this. I have to solve a constrained linear squared problem with lsqlin which is defined as follows:

min sum(xi - dataA )^2 subject to sum(xi*dataB)=Constant
xi...xn

n = 3000;

Aeq = vertcat(ones(1,n),Data B) ;
beq=matrix of constant (i.e. constraints)
lb = zeros(n,1) ;
H = eye(n) ;

Please correct me if i am wrong but i think by using lsqlin my problem is translated this way: (i may be wrong)
[x,fval] = lsqlin( sqrt(1/2).*H, sqrt(1/2).*dataA ,[],[], Aeq,beq,lb,[],initial guess, []);

I keep getting the message "Warning: Matrix is singular, close to singular or badly scaled." ( i have also tried to optimize the problem with fmincon but i get the same message)

I understand that the matrix is ill conditioned but I honestly don't know how to fix that. Any advice would be much appreciated. Thanks a lot



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.