MATLAB standard deviation

std( ) command or function gives the standard deviation value of vector or matrix or array elements, after reading this MATLAB standard deviation topic, you will know the theory and examples.


Syntax:

std(n)

  • n can be a vector or matrix.

Example: To create a vector and find the standard deviation of all elements of a vector.

Output:

n =

1 2 2 10 5 78

ans =

30.3886

Example: To create a matrix and find a standard deviation value of each column of the matrix.

Output:

n =

1   2   3
1   2   23
4   5   21


ans =

1.7321  1.7321  11.0151

Explanation:

  • 1.7321, 1.7321 and 11.0151 are the standard deviation value of the first, second and third column of the matrix respectively.

Leave a Comment

Your email address will not be published. Required fields are marked *

error: Content is protected !!
Scroll to Top