% % specgram_example.m % % Spectragram Example on real data % % set GPS time of data and duration to look at gpsStart=754562512 duration=300 % Set up chanvector for filelist operation [gpsTimes,frameFiles,frameDurs]=dir2framelist('./samrds/S3/L3/LHO/H-RDS_R_L3-7545'); % Get data using chanvector channel = chanstruct('H1:LSC-AS_Q'); % 300 seconds of S3 playground data [data, fs] = chanvector(channel, gpsStart, duration,gpsTimes,frameFiles,frameDurs); % % Creates a specgram % data - input data % nfft - number of points used for the spectrogram (default is 256 % fs = sampling rate of the data figure; specgram(data,[],fs) titleString = sprintf('%s Spectrogram of H1:LSC-AS\\_Q for %ds beginning %d', datestr(now),... duration, gpsStart); title(titleString); xlabel('Time (s)'); ylabel('Frequency (Hz)');