Contents Previous Next Subchapters Current Chapters-> mlmode_mean mlmode_std mlmode_ellipke mlmode_disp mlmode_warning str2mat int2str mlmode_contour mlmode_mesh mlmode_meshc mlmode_surf mlmode_surfc mlmode_meshgrid mlmode_etime mlmode_finite mlmode_full mlmode_isieee mlmode_isunix mlmode_issparse mlmode_isstr Parent Chapters-> Omatrix6 mlmode mlmode_mfile mlmode_std Search Tools-> contents reference index search

Computing The Standard Deviation (Mlmode)
 Syntax `colstd(`x`)` See Also colstd , mlmode_mean , colmean

Description
If x is a row vector, returns a scalar equal to the standard deviation of the elements of x Otherwise returns a row vector, with the same number of columns as x, containing the standard deviation of each column of x where x is a real, double-precision, or complex matrix. If x is complex or integer, the return value is double-precision, otherwise the return value has the same type as x. ``` ```The standard deviation of an `N` element vector `y` is ```              --------------------------------------             /        _   2                    _   2            / | y   - y  |   + ... +  | y    - y  |      \    /     1                        N             \  /   -------------------------------------        \/                     N - 1 ```where ```      _       1      y   =  --- ( y  + ... + y )              N     1          N ```
Example
If in Mlmode you enter ```      x = [0, 2, 4];      std(x) ``` O-Matrix will respond ```      2 ```