view m-toolbox/test/fsdata_class_test.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
line wrap: on
line source

function fsdata_class_test()
% Test script for frequency-series (fsdata) class.
% 
% 
% M Hewitson 31-01-07
% 
% $Id: fsdata_class_test.m,v 1.7 2008/09/05 14:18:36 hewitson Exp $
% 


%% Test constructor 1

fsd = fsdata()

%% Test constructor 2

fsd = fsdata(randn(1000,1))

%% Test constructor 3

fs    = 1000;
f     = linspace(0, fs/2, 1000);
xx    = randn(1000,1);

fsd = fsdata(f,xx,fs)

%% Test constructor 4

fs    = 1000;
x     = randn(1,1000);

fsd = fsdata(xx,fs);

fsd = fsd.setXunits('Hz');
fsd = fsd.setYunits('V Hz^-0.5');
fsd