Home > classes > @ao > ngprop.m

ngprop

PURPOSE ^

NGPROP is called by the function LTPDA_NOISEGEN

SYNOPSIS ^

function [x y] = ngprop(Tprop, E, num, y, ns)

DESCRIPTION ^

 NGPROP is called by the function LTPDA_NOISEGEN

 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.2 2008/08/01 13:19:42 ingo Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % NGPROP is called by the function LTPDA_NOISEGEN
0002 %
0003 % Inputs calculated by ...
0004 %  ... NGCONV:
0005 %            - num:   numerator coefficients
0006 %  ... NGSETUP:
0007 %            - Tprop: matrix to calculate propagation vector
0008 %            - E:     matrix to calculate propagation vector
0009 %  ... NGINIT
0010 %            - y:     initial state vector
0011 %            - num:   numerator coefficients
0012 %  ... USER
0013 %            - ns:    number of samples given as input from the user
0014 %  Outputs:
0015 %            - x:     vector of timesamples
0016 %            - y:     last calculated state vector (could be used as input
0017 %                     for next LTPDA_NOISEGEN call)
0018 % A Monsky 24-07-07
0019 %
0020 % $Id: ngprop.m,v 1.2 2008/08/01 13:19:42 ingo Exp $
0021 
0022 function [x y] = ngprop(Tprop, E, num, y, ns)
0023 
0024   lengT = length(Tprop);
0025   lengb = lengT+1;
0026 
0027   num=num';
0028   num = [num zeros(1,(lengb-length(num)-1))];
0029 
0030 
0031   x = zeros(ns,1);
0032   for i=1:ns
0033     r = randn(lengT,1);
0034     y = E * y + Tprop * r;
0035     x(i) = num*y;
0036   end
0037 
0038 end

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003