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

20 Solutions

12 Solvers

Last Solution submitted on Sep 27, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers12

Suggested Problems

Problem Tags

Community Treasure Hunt

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

Start Hunting!