±±¾©Ê¯ÓÍ»¯¹¤Ñ§Ôº2026ÄêÑо¿ÉúÕÐÉú½ÓÊÕµ÷¼Á¹«¸æ
²é¿´: 2209  |  »Ø¸´: 3

niexianling

Í­³æ (³õÈëÎÄ̳)

[ÇóÖú] matlabÖÐstd2º¯Êý¼ÆËã¾ØÕóµÄ±ê×¼²îʱ£¬·ÖĸÊdzýÒÔÁËn-1»¹ÊÇn£¿

matlabÖÐstd2º¯Êý¼ÆËã¾ØÕóµÄ±ê×¼²îʱ£¬·ÖĸÊdzýÒÔÁËn-1»¹ÊÇn£¿
ÕâÊÇÈçÏ´úÂë
function s = std2(a)
%STD2 Standard deviation of matrix elements.
%   B = STD2(A) computes the standard deviation of the values in
%   A.
%
%   Class Support
%   -------------
%   A can be numeric or logical. B is a scalar of class double.
%
%   Example
%   -------
%       I = imread('liftingbody.png');
%       val = std2(I)
%
%   See also CORR2, MEAN2, MEAN, STD.

%   Copyright 1992-2010 The MathWorks, Inc.
%   $Revision: 5.19.4.6 $  $Date: 2010/09/13 16:14:04 $

% validate that our input is valid for the IMHIST optimization
fast_data_type = isa(a,'logical') || isa(a,'int8') || isa(a,'uint8') || ...
    isa(a,'uint16') || isa(a,'int16');

% only use IMHIST for images of sufficient size
big_enough = numel(a) > 300000;

if fast_data_type && isequal(ndims(a),2) && ~issparse(a) && big_enough
   
    % compute histogram
    if islogical(a)
        num_bins = 2;
    else
        data_type = class(a);
        num_bins = double(intmax(data_type)) - double(intmin(data_type)) + 1;
    end
    [bin_counts bin_values] = imhist(a, num_bins);

    % compute standard deviation
    total_pixels = numel(a);
   
    sum_of_pixels = sum(bin_counts .* bin_values);
    mean_pixel = sum_of_pixels / total_pixels;
   
    bin_value_offsets      = bin_values - mean_pixel;
    bin_value_offsets_sqrd = bin_value_offsets .^ 2;
   
    offset_summation = sum( bin_counts .* bin_value_offsets_sqrd);
    s = sqrt(offset_summation / total_pixels);
   
else
   
    % use simple implementation
    if ~isa(a,'double')
        a = double(a);
    end
    s = std(a();
   
end
»Ø¸´´ËÂ¥
do
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

ÔÂÖ»À¶

Ö÷¹ÜÇø³¤ (Ö°Òµ×÷¼Ò)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¡ï
¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
csgt0: ½ð±Ò+1, лл 2013-06-28 11:32:57
ĬÈϵÄÊÇN-1°É£¬ÒÔÏÂÊÇMATLAB °ïÖúÎĵµµÄ˵Ã÷£º
STD Standard deviation.
    For vectors, Y = STD(X) returns the standard deviation.  For matrices,
    Y is a row vector containing the standard deviation of each column.  For
    N-D arrays, STD operates along the first non-singleton dimension of X.

    STD normalizes Y by (N-1), where N is the sample size.  This is the
    sqrt of an unbiased estimator of the variance of the population from
    which X is drawn, as long as X consists of independent, identically
    distributed samples.

    Y = STD(X,1) normalizes by N and produces the square root of the second
    moment of the sample about its mean.  STD(X,0) is the same as STD(X).

    Y = STD(X,FLAG,DIM) takes the standard deviation along the dimension
    DIM of X.  Pass in FLAG==0 to use the default normalization by N-1, or
    1 to use N.
MATLAB¡¢MSСÎÊÌâ¡¢ÆÕͨÎÊÌâÇë·¢ÌûÇóÖú£¡Ê±¼ä¾«Á¦ÓÐÏÞ£¬Ë¡²»½ÓÊÜÎÞ³¥Ë½ÐÅÇóÖú¡£
2Â¥2013-06-27 10:34:09
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

niexianling

Í­³æ (³õÈëÎÄ̳)

ÒýÓûØÌû:
2Â¥: Originally posted by ÔÂÖ»À¶ at 2013-06-27 10:34:09
ĬÈϵÄÊÇN-1°É£¬ÒÔÏÂÊÇMATLAB °ïÖúÎĵµµÄ˵Ã÷£º
STD Standard deviation.
    For vectors, Y = STD(X) returns the standard deviation.  For matrices,
    Y is a row vector containing the standard devi ...

ÎÒÏëÖªµÀµÄÊÇstd2º¯Êý
do
3Â¥2013-06-27 11:00:36
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

somomo91

ר¼Ò¹ËÎÊ (Ö°Òµ×÷¼Ò)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï
¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
niexianling: ½ð±Ò+30, ¡ïÓаïÖú, лл£¬ÎÒÖªµÀÁË 2013-06-27 20:49:12
csgt0: ½ð±Ò+1, лл 2013-06-28 11:33:11
ÒýÓûØÌû:
3Â¥: Originally posted by niexianling at 2013-06-27 11:00:36
ÎÒÏëÖªµÀµÄÊÇstd2º¯Êý...

Óöµ½¹ýÕâ¸öÎÊÌâ
matlab µÄÈ˻شð¹ý £º
std2 µ÷ÓõÄÊÇ std µÄËã·¨£¬Ò²¾ÍÊÇ˵£¬ËüÓõÄÊÇĬÈ쵀 (N-1)£¬ ³ý·Ç°Ñ std ÀïÃæµÄ²ÎÊý FLAG==0 £¬±ä³É FLAG==1
4Â¥2013-06-27 14:43:54
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ niexianling µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] Çóµ÷¼Á +8 ÕÅzic 2026-04-05 9/450 2026-04-06 13:03 by Öí»á·É
[¿¼ÑÐ] Çóµ÷¼Á +5 chenxrlkx 2026-04-05 7/350 2026-04-06 07:54 by houyaoxu
[¿¼ÑÐ] 070300»¯Ñ§Ñ§Ë¶311·ÖÇóµ÷¼Á +11 Áº¸»¹óÏÕÖÐÇó 2026-04-04 13/650 2026-04-06 07:24 by houyaoxu
[¿¼ÑÐ] £¨µ÷¼Á£©Ò»Ö¾Ô¸±¨¿¼¹þ¶û±õ¹¤Òµ´óѧ0857×ÊÔ´Óë»·¾³×¨Òµ378·Ö¿¼Éú +7 ºÝºÝ¼ÓÓÍ 2026-04-05 7/350 2026-04-05 22:31 by dongzh2009
[¿¼ÑÐ] 08ר˶275µ÷¼Á +5 AaAa7420 2026-04-05 5/250 2026-04-05 18:01 by jkddd
[¿¼ÑÐ] 324Çóµ÷¼Á +9 ÏëÉÏѧÇóµ÷ 2026-04-03 9/450 2026-04-04 23:57 by ¹û¶³´óÍõ
[¿¼ÑÐ] ¿¼Ñе÷¼Á +6 15615482637 2026-04-04 6/300 2026-04-04 22:43 by yu221
[¿¼ÑÐ] 286Çóµ÷¼Á +3 ²Ýľ²»ÑÔ 2026-04-04 3/150 2026-04-04 22:40 by lbsjt
[¿¼ÑÐ] 085600µ÷¼Á +4 1amJJ 2026-04-02 4/200 2026-04-04 21:53 by hemengdong
[¿¼ÑÐ] 22408£¬264Çóµ÷¼Á +3 ywh729 2026-04-03 4/200 2026-04-04 11:04 by ywh729
[¿¼ÑÐ] 085601Ò»Ö¾Ô¸±±Àí325·ÖÇóµ÷¼Á +6 ÕÒµ÷¼Á£¬£¬ 2026-04-02 6/300 2026-04-03 22:20 by –¹Æ?
[¿¼ÑÐ] 289-Çóµ÷¼Á +4 ÕâÀïÊÇ_ 2026-04-03 4/200 2026-04-03 14:23 by 1753564080
[¿¼ÑÐ] 283Çóµ÷¼Á +3 jiouuu 2026-04-03 4/200 2026-04-03 13:28 by jiouuu
[¿¼ÑÐ] 085600£¬320·ÖÇóµ÷¼Á +6 ´ó²öС×Ó 2026-04-02 6/300 2026-04-02 21:54 by dongzh2009
[¿¼ÑÐ] Ò»Ö¾Ô¸Î人Àí¹¤0856£¬³õÊÔ334 +3 26¿¼ÑвÄÁÏ 2026-04-02 3/150 2026-04-02 21:22 by dongzh2009
[¿¼ÑÐ] 0856²ÄÁÏÓ뻯¹¤µ÷¼Á£¬339 +14 10213207 2026-03-31 14/700 2026-04-02 21:01 by 1104338198
[¿¼ÑÐ] 377Çóµ÷¼Á +3 RASKIN 2026-04-02 3/150 2026-04-02 09:45 by zzchen2000
[¿¼ÑÐ] ¿¼Ñе÷¼Á +12 Amber00 2026-03-31 12/600 2026-04-02 09:04 by sanrepian
[¿¼ÑÐ] 265Çóµ÷¼Á +11 yelck 2026-04-01 12/600 2026-04-01 19:12 by 549790059
[¿¼ÑÐ] 254²ÄÁÏÓ뻯¹¤Çóµ÷¼Á +3 º²¶¬ÁÖéª 2026-03-30 4/200 2026-03-31 17:53 by yishunmin
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û