How to Determine Column(s) with Most Non-zero values in a matrix?

I have a matrix filled with zeros and ones (a black and white image). Most colums are filled with zeros and I want to find which columns has the most ones in them for position determining. How can I do this efficiently?

Categories

Asked:

on 30 Jun 2015

Edited:

on 30 Jun 2015

Community Treasure Hunt

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

Start Hunting!