20.01.2015 Views

njit-etd2003-081 - New Jersey Institute of Technology

njit-etd2003-081 - New Jersey Institute of Technology

njit-etd2003-081 - New Jersey Institute of Technology

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

276<br />

The program will run and output the 9 appropriate time-frequency and activity plots<br />

<strong>of</strong> the channel that was analyzed.<br />

The MATLAB program given below calculates the wavelet coefficients and plots<br />

them in 3D as power intensity versus time and frequency as well as the regular and<br />

normalized activity plots.<br />

% d_wvlet.m<br />

% Matlab Wavelet Toolbox 2.0.<br />

% Modified by D. <strong>New</strong>andee<br />

% 7-13-2001: using time - freq spectrogram and change to run with MATLAB 6.0<br />

% 10-23-2001: add calculation <strong>of</strong> normalized sympathovagal ratio using chosen<br />

% wavelet.<br />

% This program will accept any wavelet from the Matlab Wavelet Toolbox 2.0 by<br />

% entering the wavelet name in " for the 'wave' variable below.<br />

clear all;<br />

close all;<br />

SIGNAL=input('Please enter name <strong>of</strong> datafile with no extension --> ','s');<br />

filename=[SIGNAL,'.asc'];<br />

eval(['load ' filename]);<br />

original_rawdata=eval(SIGNAL)';clear SIGNAL;<br />

Question_l=input('Which channel do you want to analyze [1=02, 2=BP, 3=resp,<br />

4=ECG] --> ','s');<br />

if Question_1=='1'<br />

rawdata=original_rawdata(1,:);<br />

elseif Question_1=='2'<br />

rawdata=original_rawdata(2,:);<br />

elseif Question_1=='3'<br />

rawdata=original_rawdata(3,:);<br />

elseif Question 1=='4'<br />

rawdata=original_rawdata(4,:);<br />

end<br />

sf=input('Please enter the sampling rate <strong>of</strong> the data --> ');<br />

T=input('Please enter the window size in seconds --> ');<br />

nfft=input('Please enter the fft size --> '); % must be larger than window size and in ^^2<br />

wave = input('Please enter name <strong>of</strong> wavelet used --> Vs');

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!