forum.alglib.net

ALGLIB forum
It is currently Mon Dec 23, 2024 1:38 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.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Given matrix X and vector y can ALGLIB find w such that Xw?y
PostPosted: Wed Apr 04, 2012 5:33 am 
Offline

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
 Profile  
 
 Post subject: Re: Given matrix X and vector y can ALGLIB find w such that
PostPosted: Thu Apr 05, 2012 8:25 am 
Offline

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
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group