Path: news.mathworks.com!not-for-mail
From: "ade77 " <ade100a@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to copy a submatrix fro ma matrix
Date: Wed, 4 Nov 2009 00:03:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 22
Message-ID: <hcqgbo$lnq$1@fred.mathworks.com>
References: <hcqep5$f8g$1@fred.mathworks.com>
Reply-To: "ade77 " <ade100a@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257292984 22266 172.30.248.38 (4 Nov 2009 00:03:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 00:03:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1059495
Xref: news.mathworks.com comp.soft-sys.matlab:582213


type doc find. or help find.
the 'find' function will return the indicies of the elements or rows that meet your conditions.
Then pass the indicies back to your sub array.
 "Kishore " <kishore3385@yahoo.co.in> wrote in message <hcqep5$f8g$1@fred.mathworks.com>...
> hello,
> 
> I would want to know if there is any command by which i can copy a sub matrix from a matrix.
> What i mean is ,
> 
> A = [  1 2 3 4 5 6;
>           3 4 4 5 6 7;
>           1.0e-2 1.2e-2 1.3e-2...
>           1 2 3 4 5 5]
> 
> In the above matrix, i need to copy all elements which are greater than 1,to some matrix,( i.e i do no want the row 1.0e-2.....
> 
> This can ofcourse be done in a loop,but is there any command which simplifies the process?
> 
> I used bsxfun() ,but it doesnt seem to have this feature.
> 
> 
> Thanks