# forum.alglib.net

ALGLIB forum
 It is currently Mon Aug 15, 2022 4:27 am

 All times are UTC

### Forum rules

1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.

 Page 1 of 1 [ 2 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Given matrix X and vector y can ALGLIB find w such that Xw?yPosted: Wed Apr 04, 2012 5:33 am

Joined: Tue Apr 03, 2012 9:04 pm
Posts: 7
Hello, how would one use ALGLIB to calculate following:

Given a matrix X and a vector y of appropriate dimensions, find a vector w such that Xw?y?

Moreover, is it possible, at the same time, to make sure every entry in Xw is less that some other
number?

If ALGLIB is able to calculate it, how would one implement it?
Any help is greatly appreciated.
hugo

Top

 Post subject: Re: Given matrix X and vector y can ALGLIB find w such that Posted: Thu Apr 05, 2012 8:25 am

Joined: Tue Apr 03, 2012 9:04 pm
Posts: 7
Hello, I have found an answer on MATLAB forum.

using MATLAB you would do:

given Matrix X = rand(10,5);
given vector y = rand(10,1);
someOtherGivenNumber = 1.3; (can be different)

opts = optimset(optimset('lsqlin'),'LargeScale','off');
w = lsqlin(X,y,[-X; X] , [-y; 0*y+someOtherGivenNumber],[],[],[],[],[],opts)

Well, is this possible to perform in ALGLIB? And how exactly would you do it?
Moreover, can someOtherGivenNumber be set for every Xw?

Is there a solution?
hugo

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 2 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: No registered users and 1 guest

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for: