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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

272<br />

B.2.3.4 Program to Generate SympathoVagal Activity Plots Using Wigner<br />

Distribution This .m MATLAB program calculates the vagal tone and sympatho-vagal<br />

ratio. It is an implementation <strong>of</strong> time-frequency analysis using the Wigner distribution.<br />

The MATLAB code for the program is given below:<br />

function symparl(rawdata,top)<br />

% SYMPAR1(iibi,gtitle)<br />

% iibi is the interpolated interbeat interval calculated<br />

% by pslwsu, either in Matlab or in S-plus. Gtitle is the<br />

% title <strong>of</strong> the output graphs.<br />

% Written by Sanjay Fernando.<br />

% last revision: 7/16/01 by Douglas <strong>New</strong>andee (MATLAB 6.)<br />

rawdata=rawdata(:);<br />

order=5;<br />

freq=0.03;<br />

sample=20;<br />

nfreq=freq/sample;<br />

dtrendata=rawdata;<br />

[row,col]=size(dtrendata);<br />

I=1:row;<br />

I=I(:);<br />

A=(I/sample)/60;<br />

% This part is for testing Janse Kaiser Wigner calculation<br />

% algorithm with no window<br />

fs=1000;<br />

m=512; % The size <strong>of</strong> the fft we will be computing.<br />

skip=25; % Number <strong>of</strong> points we skip to get the next segment.<br />

p=60; % The number <strong>of</strong> freq vals we will be plotting<br />

k=fix((row-m)/skip); % the number <strong>of</strong> spectra we compute<br />

w=ones(size(1:m)); % window specification. Can be changed.<br />

w=w(:);<br />

x=hilbert(dtrendata); % Forms the analytic function <strong>of</strong> x<br />

L=m/2;<br />

l=-(L-1):(L-1);<br />

n=L;

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

Saved successfully!

Ooh no, something went wrong!