%This program generates a very simple sinusoid and then runs the sigviz code
clear all; close all; clc;
%Define Full Signal (Insert your original signal definition here)
t=0:1/1000:1;               %Time vector-determines resolution of DFT
sinefreq=20;                %Specify frequency of sinusoid
y=sin(2*pi*sinefreq*t);     %Signal vector, here set to be a 20Hz sinusoid

%Define Time and Frequency Range to Analyze/Visualize   
timerange=[0 0.5];          %Time Range, [min max], seconds, Note: (Like a box window: only signal within this time range will be analyzed with FFT and Wavelet Analysis)
freqrange=[1 50];           %Frequency Range, [min max], Hz Note: frequency cutoffs for wavelet plots will go to closest value of frequency, not exact frequency specified

%Choose Sampling for Fourier Transform and Wavelet Analysis
NFFT=200;                   %Number of Bins For Discrete Fourier Analysis (keep less than 
NSCALES=400;                %Number of Scales for Wavelet analysis 

%Display Options
plotindividuals=1;          %Set to 0 to suppress single plots, set to 1 to display and save individual plots

sigviz(y,t,timerange,freqrange,NSCALES,NFFT,plotindividuals) %Run function
