Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!j36g2000prj.googlegroups.com!not-for-mail
From: Marios Karaoulis <marios.karaoulis@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: efficient programming
Date: Mon, 10 May 2010 16:09:20 -0700 (PDT)
Organization: http://groups.google.com
Lines: 15
Message-ID: <852a0217-6000-4eb7-8084-67dd877f3d1f@j36g2000prj.googlegroups.com>
References: <80d20481-e56d-4835-a198-4c7d7f86384b@31g2000prc.googlegroups.com> 
	<4a2e0645-2244-42ef-9e91-0e990e5f7a38@o39g2000vbd.googlegroups.com>
NNTP-Posting-Host: 138.67.12.37
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1273532960 7521 127.0.0.1 (10 May 2010 23:09:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 10 May 2010 23:09:20 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j36g2000prj.googlegroups.com; posting-host=138.67.12.37; 
	posting-account=s6TICQoAAAADuUD-LRyy3llcYiV4qW1x
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) 
	Gecko/20100401 Firefox/3.6.3,gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:634414

On May 10, 5:01 pm, ImageAnalyst <imageanal...@mailinator.com> wrote:
> k5(index,:) = 0

and if you have double indexes?
k5=rand(10,10);
index=[1 5 7];
index2=[2 4 6]'


for i=1:3
    for j=3
        k5(index(i),index2(j))=0;
    end
end