comparison scripts/signal/autoreg_matrix.m @ 12831:05a6e27d7908

codesprint: Wrote 4 tests for autoreg_matrix.m
author Andriy Shinkarchuck <adriano32.gnu@gmail.com>
date Sat, 16 Jul 2011 16:21:03 -0500
parents fd0a3ac60b0e
children 72c96de7a403
comparison
equal deleted inserted replaced
12830:208f0a181be6 12831:05a6e27d7908
45 for j = 1 : k; 45 for j = 1 : k;
46 X(:, j+1) = [(zeros (j, 1)); y(1:T-j)]; 46 X(:, j+1) = [(zeros (j, 1)); y(1:T-j)];
47 endfor 47 endfor
48 48
49 endfunction 49 endfunction
50
51
52 %!test
53 %! K=4;
54 %! A = zeros(1,K+1);
55 %! A(1) = 1;
56 %! B = eye(K+1);
57 %! B(:,1) = 1;
58 %! assert (autoreg_matrix(A,K),B);
59
60 %!error autoreg_matrix()
61 %!error autoreg_matrix(1)
62 %!error autoreg_matrix(ones(4,1),5)