view m-toolbox/classes/@ao/ngprop.m @ 22:b11e88004fca
database-connection-manager
Update collection.fromRepository
author
Daniele Nicolodi <nicolodi@science.unitn.it>
date
Mon, 05 Dec 2011 16:20:06 +0100 (2011-12-05)
parents
f0afece42f48
children
line source
+ − % NGPROP is called by the function fromPzmodel
+ − %
+ − % Inputs calculated by ...
+ − % ... NGCONV:
+ − % - num: numerator coefficients
+ − % ... NGSETUP:
+ − % - Tprop: matrix to calculate propagation vector
+ − % - E: matrix to calculate propagation vector
+ − % ... NGINIT
+ − % - y: initial state vector
+ − % - num: numerator coefficients
+ − % ... USER
+ − % - ns: number of samples given as input from the user
+ − % Outputs:
+ − % - x: vector of timesamples
+ − % - y: last calculated state vector (could be used as input
+ − % for next LTPDA_NOISEGEN call)
+ − % A Monsky 24-07-07
+ − %
+ − % $Id: ngprop.m,v 1.3 2008/10/20 08:38:29 anneke Exp $
+ −
+ − function [x y] = ngprop(Tprop, E, num, y, ns)
+ −
+ − lengT = length(Tprop);
+ − lengb = lengT+1;
+ −
+ − num=num';
+ − num = [num zeros(1,(lengb-length(num)-1))];
+ −
+ −
+ − x = zeros(ns,1);
+ − for i=1:ns
+ − r = randn(lengT,1);
+ − y = E * y + Tprop * r;
+ − x(i) = num*y;
+ − end
+ −
+ − end