view m-toolbox/test/test_ao_compute.m @ 51:9d5c88356247 database-connection-manager

Make unit tests database connection parameters configurable
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:24:37 +0100
parents f0afece42f48
children
line wrap: on
line source

% function test_ao_compute

clear all;

%% Test 1

pl = plist('tsfcn', 'randn(size(t))', 'nsecs', 100, 'fs', 10);

x = ao(pl);
x.setName();
y = ao(pl);
y.setName();
z = ao(pl);
z.setName();

b = compute(x,y,z, 'a(1) + sqrt(a(2)./a(3))')

%% Test 2

b = compute([x y], z, plist('Operations', '(sqrt(a(1)) + log10(a(2)))./a(3)'))

plot(b.hist)

%% Test 3

b = compute([x y], z, plist('Operations', {'2.*a(3)./a(1)', 'a(2)-a(1)'}))

size(b)

%% Test 4

b = compute(x,y,z)