Friday, May 20, 2011

MATLAB digital signal processing

Matlab instruction

  • stem to plot diraac function
    example :
    in order to get z transform in symbols x t %same as syms x
syms
x=t;  
z=ztrans(x)

answer :

z =

z/(z - 1)^2 (from t domain to z domain)

then adding pretty(z) to print the symbolic output in a mathmatical forman

therefore :
k %if u write syms x it will give you the z transofrm of t thats why i am using syms k which also u can use syms z insteadz=ztrans(x) %answer z = (3*z*sin(4))/(z^2 - 2*cos(4)*z + 1) + (4*z*(z - cos(4)))/(z^2 - 2*cos(4)pretty(z) %answer :
     3 z
------------------- + -------------------
 2                       2
z - 2 cos(4) z + 1     z - 2 cos(4) z + 1
sin(4)           4 z (z - cos(4))

x= 3*sin(4*t) + 4*cos(4*t)
syms