Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Regarding Matrrix Indexing
Date: Thu, 1 Dec 2011 16:37:08 +0000 (UTC)
Organization: Xoran Technologies
Lines: 10
Message-ID: <jb8afk$ec0$1@newscl01ah.mathworks.com>
References: <317bafe9-2a5e-4dbf-9b5d-10f59197d8e2@g21g2000yqc.googlegroups.com> <ad064238-3b02-44af-be52-0fabb8b37cce@s4g2000yqk.googlegroups.com> <jb89fp$aqp$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1322757428 14720 172.30.248.37 (1 Dec 2011 16:37:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 1 Dec 2011 16:37:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:751112

"Roger Stafford" wrote in message <jb89fp$aqp$1@newscl01ah.mathworks.com>...
>
>   Did you do this:
> 
>  A(I(:,1)+size(A,1)*(I(:,2)-1)) = 1;
> 
> If so, that is precisely what 'sub2ind' does.
=================

Yes, but slower, because of all the input processing it has to do (in Mcode).