given an array, find it's standard deviation without using the std() function. Use sample formula (n-1) for standard deviation and round it to the nearest integer.
If array is empty, return -1.
note: std() function also uses the sample formula (n-1) for standard deviation.
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers29
Suggested Problems
-
Swap the first and last columns
22509 Solvers
-
Compute a dot product of two vectors x and y
1047 Solvers
-
669 Solvers
-
515 Solvers
-
Convert from Fahrenheit to Celsius
27599 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Is anyone else failing the first test? The test is catching "std" in the function's name.
The test suite was updated so that "std" is no longer in the name of the template function.
Otherwise, if you are attempting to use the std() function, you'll have to find a way around that—the standard-deviation formula should be easy to find.