std2
Standard deviation of matrix elements
Syntax
Description
Examples
Compute 2-D Standard Deviation
Read a grayscale image into the workspace, then calculate the standard deviation of the pixel intensity values.
I = imread('liftingbody.png');
val = std2(I)
val = 31.6897
Input Arguments
A
— Input data
numeric array | logical array
Input data, specified as a numeric or logical array.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
Output Arguments
B
— Standard deviation
numeric scalar
Standard deviation of input data, returned as a numeric scalar. If the data type of
A
is single
, then the data type
of B
is also single
. Otherwise, the
data type of B
is double
.
Data Types: single
| double
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
std2
supports the generation of C
code (requires MATLAB®
Coder™). For more information, see Code Generation for Image Processing.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Image Processing on a GPU.
Version History
Introduced before R2006aR2024b: Generate C code using MATLAB Coder
std2
now supports the generation of
C code (requires MATLAB
Coder).
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)