firstname.lastname@example.org wrote in message <email@example.com>... > 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,:)];
A(ia,:) is equal to B(ib,:) and is equal to C, regardless the number of rows of A and B.
> > But I don't know why doubling the columns, because per definition > A(ia,:) is identically B(ib,:) when using intersect.
Don't understand your question. They are identical,, therefore you just duplicated C twice on the horizontal dimension. I though I make it clear in my previous post.