Mean of values in the 1st column where the value in the second column is zero

I have data in a MAT file with 2 columns, the first column is length and the second column is 0 or 1.
eg: Length Y/N
2.5 1
3.2 0
How do I get mean of all values of first column where the value in second column is zero?

Tags

Asked:

Sid
on 28 Feb 2014

Answered:

Sid
on 1 Mar 2014

Community Treasure Hunt

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

Start Hunting!