Home > ACA-Code > FeatureTimeStd.m

FeatureTimeStd

PURPOSE ^

computes the standard deviation of a time domain signal

SYNOPSIS ^

function [vstd, t] = FeatureTimeStd(x, iBlockLength, iHopLength, f_s)

DESCRIPTION ^

computes the standard deviation of a time domain signal
> called by ::ComputeFeature
>
> @param x: audio signal
> @param iBlockLength: block length in samples
> @param iHopLength: hop length in samples
> @param f_s: sample rate of audio data (unused)
>
> @retval vstd standard deviation
> @retval t time stamp
 ======================================================================

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %computes the standard deviation of a time domain signal
0002 %> called by ::ComputeFeature
0003 %>
0004 %> @param x: audio signal
0005 %> @param iBlockLength: block length in samples
0006 %> @param iHopLength: hop length in samples
0007 %> @param f_s: sample rate of audio data (unused)
0008 %>
0009 %> @retval vstd standard deviation
0010 %> @retval t time stamp
0011 % ======================================================================
0012 function [vstd, t] = FeatureTimeStd(x, iBlockLength, iHopLength, f_s)
0013 
0014     % blocking
0015     [x_b, t] = ToolBlockAudio(x, iBlockLength, iHopLength, f_s);
0016     iNumOfBlocks = size(x_b, 1);
0017     
0018     % allocate memory
0019     vstd = zeros(1,iNumOfBlocks);
0020 
0021     for (n = 1:iNumOfBlocks)
0022         % calculate the standard deviation
0023         vstd(n) = std(x_b(n, :), 1);
0024     end
0025 end

Generated on Fri 22-Apr-2022 20:59:51 by m2html © 2005