function annOut = anndelay(new_input, x_old, W) % FILE: anndelay.m % CALL: annOut = anndelay(new_input, x_old) % new_input: scalar value to be the new element 1 of x_delayed % x_old: original x vector % % Copyright 1997 by Peter C. Jones and Scott D. Tepavich. % All Rights Reserved. x_rot = rot90(x_old); % set it up for delaysig x_del = delaysig(x_rot,1,1); % delay by 1 time step x_del(1) = new_input; x_col = rot90(fliplr(x_del)); % back to column vector [30,1] W_row = rot90(W); % row vector [1,30] annOut = purelin(W_row * x_col); end