Path: news.mathworks.com!not-for-mail
From: "us " <us@neurol.unizh.ch>
Newsgroups: comp.soft-sys.matlab
Subject: Re: matrices elements
Date: Mon, 6 Aug 2007 15:04:12 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 10
Message-ID: <f97d9c$pp7$1@fred.mathworks.com>
References: <f97cki$6hf$1@fred.mathworks.com>
Reply-To: "us " <us@neurol.unizh.ch>
NNTP-Posting-Host: webapp-00-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1186412652 26407 172.30.248.35 (6 Aug 2007 15:04:12 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 6 Aug 2007 15:04:12 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:422611


Luana Caselli:
<SNIP logical indexing evergreen...

one of the many solutions

     m1=magic(4)
     m2=+(rand(size(m1))>.75) % a few ones, type double
     m1(m2==1)

us