Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
problem with find

Subject: problem with find

From: Jonathan

Date: 22 Jan, 2012 19:36:27

Message: 1 of 2

Hi,

I'm having a problem with using find, that's probably super easy to resolve but I'm forgetting the correct format. I have a matrix (A) 100*7. I have identified a subset of the matrix using find and have the appropriate indices (ind=50*1 matrix). What I'm trying to do is simply extract that subset B=A(ind). If I do this I get a 50*1 matrix, however, what I would like is a 50*7 matrix. What's the correct format for deriving this?

Thanks
Jon

Subject: problem with find

From: TideMan

Date: 23 Jan, 2012 01:00:15

Message: 2 of 2

On Jan 23, 8:36 am, "Jonathan " <jkak...@yahoo.co.uk> wrote:
> Hi,
>
> I'm having a problem with using find, that's probably super easy to resolve but I'm forgetting the correct format.  I have a matrix (A) 100*7. I have identified a subset of the matrix using find and have the appropriate indices (ind=50*1 matrix). What I'm trying to do is simply extract that subset B=A(ind). If I do this I get a 50*1 matrix, however, what I would like is a 50*7 matrix.  What's the correct format for deriving  this?
>
> Thanks
> Jon

B=A(ind,:);

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us