|
Thanks,
my code....
B = (208,1)
A = (368183,2)
....
[tf,loc] = ismember(B, A);
gives me a new file 'loc' that identifies the position of values in A that match B.
However, how do I create a new file that has the two columns of data in A that matches B?
What I am really after are the corresponding values in A(:,1), based on matching the values in B with the values in A(:,2).
Thanks
Jon
Andrew Stevens" <astevens@JUNKusgs.gov> wrote in message <hm765r$1ai$1@fred.mathworks.com>...
> "Jonathan" <jkakiwi@yahoo.co.uk> wrote in message <hm759l$58d$1@fred.mathworks.com>...
> > G'day,
> >
> > I have two matrices of different lengths, A(2,1000) & B(1,268); note these values will change depending on the data file.
> >
> > What I would like to do is to finds those elements contained in B that match the same values in A(:,2). I am currently struggling with a for loop with no luck. Any advice would be much appreciated.
> >
> > Thanks
> > Jon
>
> Jon,
> Take a look at:
> ISMEMBER
>
> -Andrew
|