Count percentage of zero elements of a matrix

Hi,
I want to count the percentage of zero elements of a matrix. For an example, I have matrix 3x3
M = [1 1 0 1 0 0 0 0 0]
Can anyone help me with Matlab code?I'm a newbie with Matlab. Tq

More Answers (0)

Community Treasure Hunt

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

Start Hunting!