Path: news.mathworks.com!not-for-mail
From: "muk " <hungocan@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: -extract 120X9 matrix from 1000X9 matrix randomly
Date: Tue, 9 Feb 2010 19:05:21 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 30
Message-ID: <hksblh$k5d$1@fred.mathworks.com>
References: <hks11k$ti$1@fred.mathworks.com> <hks3eh$46u$1@fred.mathworks.com>
Reply-To: "muk " <hungocan@hotmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1265742321 20653 172.30.248.35 (9 Feb 2010 19:05:21 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 9 Feb 2010 19:05:21 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2183094
Xref: news.mathworks.com comp.soft-sys.matlab:605864


"ade77 " <ade100a@gmail.com> wrote in message <hks3eh$46u$1@fred.mathworks.com>...
> "muk " <hungocan@hotmail.com> wrote in message <hks11k$ti$1@fred.mathworks.com>...
> > Hello all,
> > 
> > Now, i have 1000X9 matrix which is quality parameters. And, i want to extract 120X9 matris randomly from 1000x9 matrix.
> > How can i do that?
> > 
> > Sincerely, 
> 
> Like Walter suggested, randperm seems to be your easiest way.
> 
> your_matrix = 1000 by 9
> h = randperm(1000);
> g = h(1:120);
> rand_array = your_matrix(g,:);


Thank you Everyone!

That is the best choice and fast choice. There are many view to solve this problem. 


> your_matrix = 1000 by 9
> h = randperm(1000);
> g = h(1:120);
> rand_array = your_matrix(g,:);

That is choice which is independent in data. May be, distributions of data may be important. But, there is not a problem. So, as i said ,this is the best choice, and clever choice. 

Thank you all thank you "ade77"  my friend.