# feature_calc_script

## PURPOSE

feature_calc_script

## SYNOPSIS

This is a script file.

## DESCRIPTION

     feature_calc_script

## CROSS-REFERENCE INFORMATION

This function calls:

- acoustic_features_MB Usage:

This function is called by:

## SOURCE CODE

    0001 % feature_calc_script
    0002
    0003 tmp=dir;
    0004 nfiles=length(tmp);
    0005 names=cell(nfiles,1); for j=1:nfiles, names(j)=cellstr(tmp(j).name); end;
    0006 wavnames=regexp(names,'.*wav$','match');
    0007 ind=~cellfun('isempty',wavnames);
    0008 wavnames=wavnames(ind);
    0009 segnames=regexp(names,'.*wav.seg.txt$','match');
    0010 ind=~cellfun('isempty',segnames);
    0011 segnames=segnames(ind);
    0012
    0013 nwaves=length(wavnames);
    0014
    0015 movingwin=[0.01 0.005];
    0016 params.tapers=[2 3]; params.pad=1; params.Fs=44100; params.fpass=[5000 20000];
    0017 for i=1:nwaves,
    0018     data=wavread(wavnames{i}{1});
    0019     [Feat S t f]= acoustic_features_MB(data,movingwin,params);
    0020     sname=[wavnames{i}{1} '.sp'];
    0021     save(char(sname),'S','t','f','Feat','-mat');
    0022 end