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.

262<br />

This program provides the STFT and the bilinear time-frequency analysis (Wigner,<br />

Smoothed Wigner, Choi-William, Born-Jordan-Cohen and Rihaczek-Margenau) with 3D<br />

power spectra versus time and frequency, contour plots and activity plots using the<br />

selected time-frequency distribution as outputs.<br />

% This program is a modified version <strong>of</strong> the original work <strong>of</strong> Adib Mansour (1994)<br />

% by Rindala Saliba (1996)<br />

% Modified by Douglas <strong>New</strong>andee 7/14/2001 for better 3D Graphs and to work with<br />

% MATLAB 6.0 and later.<br />

clear<br />

clc<br />

choose=menu('SELECT YOUR DISTRIBUTION', 'Short Time Fourier Transform',...<br />

`Wigner','Smoothed Wigner',...<br />

`Choi Williams',...<br />

`Born_Jordan_Cohen (RID)','Rihaczek_Margenau');<br />

clc<br />

disp(")<br />

disp([blanks(30) 'WELLCOME TO'])<br />

disp([blanks(21) 'TIME FREQUENCY DISTRIBUTION'])<br />

disp([blanks(33) 'WORLD'])<br />

disp(")<br />

disp(")<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 1=input('Which column do you want to analyze [1 2 3] --> ','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 />

end<br />

Signa=rawdata;<br />

Lwin=input('Please enter the length <strong>of</strong> analysis window --> ');<br />

fftlen=input('Please enter the length <strong>of</strong> FFT analysis --> ');<br />

skip=input('Please enter the number <strong>of</strong> the skip points --> ');<br />

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

Question_2=input('Do you want to detrend the input signal [y/n] --> ','s');

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

Saved successfully!

Ooh no, something went wrong!