Mercurial > hg > emotion-detection-top-level
view Code/Test/plotAudioFrameByType.m @ 3:e1cfa7765647
initial commit - this file calculates the basic set of metrics (mean, variance, min and max, from an array of supplied data.
author | Dawn Black <dawn.black@eecs.qmul.ac.uk> |
---|---|
date | Mon, 10 Sep 2012 09:20:12 +0100 |
parents | ea0c737c6323 |
children | 92ca03a8fa99 |
line wrap: on
line source
function plotAudioFrameByType( x, noOfValidFrames, vuv, frameLength ); hold on for frameIdx = 1:noOfValidFrames startPoint = ((frameIdx-1) * frameLength)+1; endPoint = frameIdx * frameLength; % if( vuv( frameIdx ) == 0 ) %silent % plot( startPoint : endPoint , x( startPoint : endPoint ), 'w' ); if( vuv( frameIdx ) == 1 ) % voiced plot( startPoint : endPoint , x( startPoint : endPoint ), 'y' ); elseif( vuv( frameIdx ) == 2 ) %unvoiced plot( startPoint : endPoint , x( startPoint : endPoint ) , 'r' ); end end hold off