06 December 2007

Differential Equation Representing an LTI System

Algorithm

In general, any difference equation is represented as: y(n)+a1y(n-1)+a2y(n-2)+......=b0x(n)+b1x(n-1)+........

  1. Input the coefficients of x(n)
  2. Input the coefficients of y(n)
  3. Input the sequence x(n)
  4. Find the solution of the equation using MATLAB command "filter(b,a,x)" where b is the coefficients of x(n),a is the coefficients of the y(n) and x is the input sequence x(n)
  5. Display the solution

Program

% program to solve a given differential equation which represents an LTI system

b=input('Enter the coefficients of x(n)');

a=input('Enter the coefficients of y(n)');

x=input('Enter the input sequence x(n)');

y=filter(b,a,x); % solve the given equation

disp(y); %display the solution

No comments:

Post a Comment

Your Comments... (comments are moderated)