Given a matrix A, calculate the sample standard deviation of only the non-zero elements.
If there are fewer than 2 non-zero elements in the matrix, return 0.
Example:
Input: A = [1 0 3; 0 5 0]
Non-zero elements: [1, 3, 5]
Output: y = 2

Solution Stats

8 Solutions

4 Solvers

Last Solution submitted on Aug 15, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers4

Suggested Problems

Problem Tags

Community Treasure Hunt

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

Start Hunting!