Indices of 'convolution' aka finding indicies of one matrix from a set of matrices in another matrix

Hi
I'm wondering if there is an efficient way to do the following.
Set up:
A=randi(2,10,3); B=(A(:,1)==1); C=A(B); indsOfC=myfun(C);
So C is a matrix whose rows are just those where A had a first column of 1, and inds is the result of doing some function with C as its argument. What I'm wondering is if there is an easy way of relating the indicies of C to the indices of A.
Thanks

Answers (1)

Not very clear what you are asking. Using your example, if you run [I,J,V]=find(B), is the matrix I what you are looking for?

Categories

Asked:

on 9 Sep 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!