cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Bound & Constrained Linear Least Squares?

ptc-5449724
1-Newbie

Bound & Constrained Linear Least Squares?

Hi,

Will this program perform bound and constraint linear least squares? The requirement is 3 vairables bound between 0 --> 1, and the constraint is the sum of the variables must = 1 (they are percentages of a whole). It's an overdetermined system so there will be ~10 rows in the equation matrix. MATLAB's 'lsqlin' function does exacly what I need, but we currently only have a Mathcad license.

Thanks!

Erik

1 REPLY 1

Don't think so, at least not out of the box, but then I may be wrong.

You can use minerr() with a solve block but the costraints are not handled as hard constraints by Mathcad. Maybe a look at geninv is useful for overconstrained systems, too. Also lsolve will return a least-squares solution, but not constrained.

If you are using Mathcad 15 or below you may search the net for the Mathcad E-Book/Handbook "Inside Mathcad: Solving". It used to be a free download from the Ressource pages of the Mathcad homepage, but PTC used to break all those useful goodies.

EDIT: Its here: http://communities.ptc.com/community/mathcad/blog/2010/05/13/inside-mathcad-series-programming-solving-and-ode-solvers

So setup and post a worksheet with your problem and constraints and tell us what result you expect.

Top Tags