Home > ACA-Code > FeatureSpectralSlope.m

FeatureSpectralSlope

PURPOSE ^

computes the spectral slope from the magnitude spectrum

SYNOPSIS ^

function [vssl] = FeatureSpectralSlope (X, f_s)

DESCRIPTION ^

computes the spectral slope from the magnitude spectrum
> called by ::ComputeFeature
>
> @param X: spectrogram (dimension FFTLength X Observations)
> @param f_s: sample rate of audio data (unused)
>
> @retval vssl spectral slope
 ======================================================================

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %computes the spectral slope from the magnitude spectrum
0002 %> called by ::ComputeFeature
0003 %>
0004 %> @param X: spectrogram (dimension FFTLength X Observations)
0005 %> @param f_s: sample rate of audio data (unused)
0006 %>
0007 %> @retval vssl spectral slope
0008 % ======================================================================
0009 function [vssl] = FeatureSpectralSlope (X, f_s)
0010 
0011     % compute mean
0012     mu_x = mean(abs(X), 1);
0013     
0014     % compute index vector
0015     kmu = (0:size(X, 1)-1) - size(X, 1)/2;
0016     
0017     % compute slope
0018     X = X - repmat(mu_x, size(X, 1), 1);
0019     vssl = (kmu*X) / (kmu*kmu');
0020 end
0021 
0022

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