Problem 47430. Find the standard deviation of an array
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
		ChrisR
    	on 2 Nov 2021
	
	
  	Is anyone else failing the first test? The test is catching "std" in the function's name.
		goc3
    	on 12 Apr 2022
	
	
  	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.
Solution Comments
Show commentsProblem Recent Solvers29
Suggested Problems
- 
         Numbers with prime factors 2, 3 and 5. 586 Solvers 
- 
         
         248 Solvers 
- 
         
         483 Solvers 
- 
         Number of Even Elements in Fibonacci Sequence 1460 Solvers 
- 
         
         898 Solvers 
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!