Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: -extract 120X9 matrix from 1000X9 matrix randomly
Date: Tue, 9 Feb 2010 16:35:19 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <hks2s7$rck$1@fred.mathworks.com>
References: <hks11k$ti$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1265733319 28052 172.30.248.38 (9 Feb 2010 16:35:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 9 Feb 2010 16:35:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1886545
Xref: news.mathworks.com comp.soft-sys.matlab:605798


"muk " wrote in message 
> 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, 

help rand

Example:
A = rand(1000,9);

rows = ceil(120*rand(120,1));
cols =  ceil(9*rand(9,1));

randMat = A(rows,cols);

Oleg