diff Code/ProcessDatabase.m @ 1:a3d62264030c

tested and working
author Dawn Black <dawn.black@eecs.qmul.ac.uk>
date Mon, 10 Sep 2012 09:13:53 +0100
parents ea0c737c6323
children 92ca03a8fa99
line wrap: on
line diff
--- a/Code/ProcessDatabase.m	Thu Jul 26 14:46:25 2012 +0100
+++ b/Code/ProcessDatabase.m	Mon Sep 10 09:13:53 2012 +0100
@@ -255,13 +255,25 @@
                             case 'getPRAAT'
                                 % collate all Shimmer values                
                                 statsFileName = '../../../../../../../TestResults/singingPRAATStats.txt';
-                                statsFileID = fopen( statsFileName, 'w' );
+                                
                                 % Add a header row
                                 if( firstfileOpen == 1 )
+                                    statsFileID = fopen( statsFileName, 'w' );
                                     fprintf( statsFileID, 'Metrics calculated using the PRAAT software. \n' );
-                                    fprintf( statsFileID, ' name \t JITTER: ddp \t local \t ppq5 \t rap \t SHIMMER: local \t dda \t apq3 \t apq5 \t apq11 \t FORMANTS: number of formants \t positions \t bandwidths \n');
+                                    fprintf( statsFileID, ' name \t JITTER: ddp \t local \t ppq5 \t rap \t SHIMMER: local \t dda \t apq3 \t apq5 \t apq11 \n');
+                                    fprintf( statsFileID, 'For each of the BURG FORMANTS: numberOfFormants \t meanFrequency \t varFrequency \t minFrequency \t maxFrequency \n');
+                                    fprintf( statsFileID, 'meanFrequencyDerivative \t varienceFrequencyDerivative \t minFrequencyDerivative \t max FrequencyDerivative \n');
+                                    fprintf( statsFileID, 'meanFrequency2ndDerivative \t varienceFrequency2ndDerivative \t minFrequency2ndDerivative \t max Frequency2ndDerivative \n');
+                                    fprintf( statsFileID, 'meanBandwidth \t varBandwidth \t minBandwidth \t maxBandwidth \n');
+                                    fprintf( statsFileID, 'meanBandwidthDerivative \t varBandwidthDerivative \t minBandwidthDerivative \t maxBandwidthDerivative \n');
+                                    fprintf( statsFileID, 'meanBandwidth2ndDerivative \t varBandwidth2ndDerivative \t minBandwidth2ndDerivative \t maxBandwidth2ndDerivative \n');
+                                    fprintf( statsFileID, 'For the mean of all three formants: meanFrequency \t varFrequency \t minFrequency \t maxFrequency \n');
+                                    fprintf( statsFileID, 'meanFrequencyDerivative \t varienceFrequencyDerivative \t minFrequencyDerivative \t max FrequencyDerivative \n');
+                                    fprintf( statsFileID, 'meanFrequency2ndDerivative \t varienceFrequency2ndDerivative \t minFrequency2ndDerivative \t max Frequency2ndDerivative \n');
                                     firstfileOpen = 0;
-                                 end
+                                else
+                                    statsFileID = fopen( statsFileName, 'a' );
+                                end
 
                                 get_PRAAT( newDirName, statsFileID );
                                 fclose( statsFileID );