readme file for matlab_scripts.zip % Yuan Qi % yuanqi@media.mit.edu % MIT Media lab, Affective computing group % June 10 2002 This zip file includes kalman_defaults.mat kalmspectr_irspl.m spectroentrpy.m usekalmspectr.m entropy.m entropysmpl.m histogram.m Among all the unziped files, spectroentrpy.m is the main file, which computes the entropy of the spectrogram of a given signal x. function [entest, mapl]= spectroentrpy(x, t, NN, fsig, fdisp) % x: signal % t: sampling time % NN: number of frequency bands % fsig: spectrom range [0 ~ fsig/2] . Default: 1.2 % fdisp: graphic output or not. Default: 1 % entest: the entropy value of the spectrogram % mapl: the spectrogram For example, x is the heart rate signal and t is the sampling time, which can be evenly or unevenly spaced. If we want the frequency resolution of the spectrum to be 100, spectrom range to be 0 to 1.0 Hz, and have graphic output, then NN = 100, fsig = 2.0, and fdisp = 1. Running "[entest, mapl]= spectroentrpy(x, t, NN, fsig, fdisp)" in matlab enviroment, we obtain the entropy value of the spectrogram of the heart rate, which measures the heart rate variability. The spectrogram of the heart rate is saved in the output "mapl" correspondingly.