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

22 Solutions

13 Solvers

Last Solution submitted on Nov 04, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers13

Suggested Problems

Problem Tags

Community Treasure Hunt

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

Start Hunting!