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: constrained regression/optimization
Replies: 2   Last Post: Feb 1, 2013 8:05 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Torsten

Posts: 1,440
Registered: 11/8/10
Re: constrained regression/optimization
Posted: Feb 1, 2013 8:05 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Jelena Ivanovic" <ivanovic.jelena@yahoo.com> wrote in message <keefrt$m0f$1@newscl01ah.mathworks.com>...
> Dear all,
>
> I am relatively new Matlab user, and I need to find a solution for coefficients a and b in the following equation:
>
> X=a*Y + (1-a) * [Z + b*Q + (1-b) * W]
>
> where:
>
> - X, Y, Z, Q and W are data vectors;
> - constant should ideally be equal to zero (but this isn't necessary);
> - 1-a, b and 1-b all need to be positive.
>
> Is there maybe something that could be done with lsqlin from the Optimization toolbox?
>
> Many thanks,
>
> Jelena


Setting
c1=a and c2=(1-a)*b,
your expression for X becomes
X=c1*Y+(1-c1)*Z+c2*Q+(1-c1-c2)*W.
Thus you want to minimize the norm of
c1*(Y-Z-W)+c2*(Q-W)+(Z+W-X)
under the constraints
c1 >= 0
1-c1 >= 0
c2 >= 0
1-c1-c2 >= 0

After solving the above problem, you can recover a and b via
a=c1, b=c2/(1-c1)

Best wishes
Torsten.



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.