view m-toolbox/test/test_ao_spectrogram.m @ 2:18e956c96a1b
database-connection-manager
Add LTPDADatabaseConnectionManager implementation. Matlab code
author |
Daniele Nicolodi <nicolodi@science.unitn.it> |
date |
Sun, 04 Dec 2011 21:23:09 +0100 (2011-12-04) |
parents |
f0afece42f48 |
children |
|
line source
% function test_ao_spectrogram()
% TEST_AO_SPECTROGRAM test spectrogram function for analysis objects.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: TEST_AO_SPECTROGRAM test spectrogram function for analysis
% objects.
%
% CALL: test_ao_spectrogram;
%
% HISTORY: 26-12-2007 Hewitson
% Creation.
%
% VERSION: % $Id: test_ao_spectrogram.m,v 1.1 2008/01/30 21:36:26 hewitson Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
%% Make time-series object
nsecs = 100;
fs = 100;
p = plist('waveform', 'noise', 'fs', fs, 'nsecs', nsecs);
n = ao(p);
p = plist('waveform', 'chirp', 'fs', fs, 'nsecs', nsecs, 'f0', 0, 'f1', 50, 't1', nsecs);
s = ao(p);
a = s+n;
%% Make spectrogram
sxx = spectrogram(a, plist('Nfft', 4*fs));
figure
imagesc(sxx.data.x, sxx.data.y, sxx.data.z)