Problem 49577. Find the density of non-zero values
Find the density of a non-zero values in a matrix
ex: for a matrix [1 0; 0 1] the density of non-zero values is 2/4=0.5
note: Round the solution to 2 decimal places
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers33
Suggested Problems
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1971 Solvers
-
Convert a vector into a number
612 Solvers
-
Find Factrorial without using built-in function
136 Solvers
-
find the surface area of a cube
562 Solvers
-
Rotate counterclockwise a matrix 90 deg with left-bottom element
162 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!