From: Harsh Dhingra on
Hi,

I have a large matrix of raw data. I wanted to lookup a value from the first column of the matrix and extract the corresponding row entries from another column. Was wondering what would be the best way to do this.

Thanks,
Harsh
From: Walter Roberson on
Harsh Dhingra wrote:

> I have a large matrix of raw data. I wanted to lookup a value from the
> first column of the matrix and extract the corresponding row entries
> from another column. Was wondering what would be the best way to do this.

Probably using sub2ind()
From: Matt J on
"Harsh Dhingra" <hrshdhngr(a)gmail.com> wrote in message <i3up2a$g08$1(a)fred.mathworks.com>...
> Hi,
>
> I have a large matrix of raw data. I wanted to lookup a value from the first column of the matrix and extract the corresponding row entries from another column. Was wondering what would be the best way to do this.
========

Do you mean this?

A(A(:,1)==MyValue,OtherColumn);
From: Harsh Dhingra on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <i3uqq5$81j$1(a)fred.mathworks.com>...
> "Harsh Dhingra" <hrshdhngr(a)gmail.com> wrote in message <i3up2a$g08$1(a)fred.mathworks.com>...
> > Hi,
> >
> > I have a large matrix of raw data. I wanted to lookup a value from the first column of the matrix and extract the corresponding row entries from another column. Was wondering what would be the best way to do this.
> ========
>
> Do you mean this?
>
> A(A(:,1)==MyValue,OtherColumn);

That works. Sorry if it was a trivial question.
Thanks!