Escolar Documentos
Profissional Documentos
Cultura Documentos
Funções Utilizadas
Funções Utilizadas
f u n c t i o nd=U s a m p ( n ) d = ( n = = 0 ) ;
f u n c t i o n s i n ( b * a + c ) ;
y=D t s i n ( a ,b , c )
f u n c t i o n[ y ,n y ]=D e l a y ( x ,n x ,n 0 ) %D e l a y x n x n f u n c t i o nt oe m u l a t et h ei d e a ld e l a ys y s t e m %f o rad e l a yo fn N=m a x ( s i z e ( n x ) ) ; % d e t e r m i n et h es i z eo fn x i fn 0 > = 0 %c h e c kf o rp o s i t i v ed e l a y n y =[ n x ( 1 : N 1 )n x ( N ) : n x ( N ) + n 0 ] ; %a u g m e n tt h ei n d e c e sv e c t o rf o rp o s d e l a y e l s e i fn 0< 0 n y=[ n x ( 1 ) + n 0 : n x ( 1 )n x ( 2 : N ) ] ; %a u g m e n tt h ei n d e c e s v e c t o rf o rn e g d e l a y e n d ; M=m a x ( s i z e ( n y ) ) ; %d e t e r m i n et h e s i z eo fn y y=z e r o s ( s i z e ( n y ) ) ; %u n d e f i n e dv a l u e so fxw i l lb es e tt o i fn 0>0 y( n 0 + 1 : M )=x ; e l s e y ( 1 : M + n 0 )=x ; e n d f u n c t i o n y=C e x p ( a ,b ) y=e x p ( s q r t ( 1 ) * a * b ) ;