Popular Posts

Monday, October 31, 2011

MATLAB : Frequently used built-in functions in Signal Processing Toolbox

filter(b,a,x)


FILTER One-dimensional digital filter.
    Y = FILTER(B,A,X) filters the data in vector X with the
    filter described by vectors A and B to create the filtered
    data Y.  The filter is a "Direct Form II Transposed"
    implementation of the standard difference equation:

    a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb)
                          - a(2)*y(n-1) - ... - a(na+1)*y(n-na)

    If a(1) is not equal to 1, FILTER normalizes the filter
    coefficients by a(1).

    FILTER always operates along the first non-singleton dimension,
    namely dimension 1 for column vectors and non-trivial matrices,
    and dimension 2 for row vectors.



fft(x) 

FFT Discrete Fourier transform.
    FFT(X) is the discrete Fourier transform (DFT) of vector X.  For
    matrices, the FFT operation is applied to each column. For N-D
    arrays, the FFT operation operates on the first non-singleton
    dimension.



ifft(x)

IFFT Inverse discrete Fourier transform.
    IFFT(X) is the inverse discrete Fourier transform of X.



conv(a,b)


CONV Convolution and polynomial multiplication.
    C = CONV(A, B) convolves vectors A and B.  The resulting vector is
    length MAX([LENGTH(A)+LENGTH(B)-1,LENGTH(A),LENGTH(B)]). If A and B are
    vectors of polynomial coefficients, convolving them is equivalent to
    multiplying the two polynomials.





deconv(b,a)



   [Q,R] = DECONV(B,A) deconvolves vector A out of vector B.  The result
    is returned in vector Q and the remainder in vector R such that
    B = conv(A,Q) + R.

    If A and B are vectors of polynomial coefficients, deconvolution
    is equivalent to polynomial division.  The result of dividing B by
    A is quotient Q and remainder R.





abs(x)


ABS    Absolute value.
    ABS(X) is the absolute value of the elements of X. When
    X is complex, ABS(X) is the complex modulus (magnitude) of
    the elements of X.





angle(h)


ANGLE  Phase angle.
    ANGLE(H) returns the phase angles, in radians, of a matrix with
    complex elements. 





freqz(b,a,N)


FREQZ Digital filter frequency response.
    [H,W] = FREQZ(B,A,N) returns the N-point complex frequency response
    vector H and the N-point frequency vector W in radians/sample of
    the filter:
                jw               -jw              -jmw
         jw  B(e)    b(1) + b(2)e + .... + b(m+1)e
      H(e) = ---- = ------------------------------------
                jw               -jw              -jnw
             A(e)    a(1) + a(2)e + .... + a(n+1)e
    given numerator and denominator coefficients in vectors B and A. The
    frequency response is evaluated at N points equally spaced around the
    upper half of the unit circle. If N isn't specified, it defaults to
    512.





stem(y)


STEM   Discrete sequence or "stem" plot.
    STEM(Y) plots the data sequence Y as stems from the x axis
    terminated with circles for the data value. If Y is a matrix then
    each column is plotted as a separate series.







stem(x,y)



STEM(X,Y) plots the data sequence Y at the values specified
    in X.



plot(x,y)


PLOT   Linear plot.
    PLOT(X,Y) plots vector Y versus vector X. If X or Y is a matrix,
    then the vector is plotted versus the rows or columns of the matrix,
    whichever line up.  If X is a scalar and Y is a vector, disconnected
    line objects are created and plotted as discrete points vertically at
    X.





title('text')


TITLE  Graph title.
    TITLE('text') adds text at the top of the current axis





xlabel('text')


XLABEL X-axis label.
    XLABEL('text') adds text beside the X-axis on the current axis.





ylabel('text')




YLABEL Y-axis label.
    YLABEL('text') adds text beside the Y-axis on the current axis.

1 comment:

  1. Hello) is there a way to plot a 3D equipotential surface of a 3D scalar field?

    ReplyDelete