X-Received: by 10.224.110.68 with SMTP id m4mr12225971qap.2.1358849926621;
        Tue, 22 Jan 2013 02:18:46 -0800 (PST)
X-Received: by 10.49.75.9 with SMTP id y9mr4529340qev.9.1358849926532; Tue, 22
 Jan 2013 02:18:46 -0800 (PST)
Path: news.mathworks.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!newsswitch.lcs.mit.edu!xmission!news.glorb.com!p13no4076117qai.0!news-out.google.com!k2ni1999qap.0!nntp.google.com!p13no5889022qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.soft-sys.matlab
Date: Tue, 22 Jan 2013 02:18:46 -0800 (PST)
In-Reply-To: <kdhu6v$o6p$1@newscl01ah.mathworks.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=91.212.3.144; posting-account=OfUY6QoAAAAk_mkWQY7ovrjhl5ZF8yI1
NNTP-Posting-Host: 91.212.3.144
References: <kdhu6v$o6p$1@newscl01ah.mathworks.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7db9a287-0e77-4367-94e1-a7e73a20411c@googlegroups.com>
Subject: Re: Problem using horzcat with index vectors in a for loop
From: nl.doc@arcor.de
Cc: Thomas <thomas.seers@postgrad.manchester.ac.uk>
Injection-Date: Tue, 22 Jan 2013 10:18:46 +0000
Content-Type: text/plain; charset=ISO-8859-1
Lines: 10
Xref: news.mathworks.com comp.soft-sys.matlab:787064

Does the following line execute the correct task?
Independently of the dimension of A and B (only number of columns should be the same).

desired=[A(ia,:),B(ib,:)];

But I don't know why doubling the columns, because per definition 
A(ia,:) is identically B(ib,:) when using intersect.

Regards
Norbert