Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What algorithm is used for this impulse response program?

Status
Not open for further replies.

immadi.jagadish

Member level 5
Member level 5
Joined
Dec 19, 2010
Messages
89
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,820
I am not understanding what algorithm is used for this program

check it out and inform what may be it?

‘C’ Program to Implement Impulse response:

#include <stdio.h>

#define Order 2
#define Len 10

float y[Len]={0,0,0},sum;

main()
{
int j,k;

float a[Order+1]={0.1311, 0.2622, 0.1311};
float b[Order+1]={1, -0.7478, 0.2722};

for(j=0;j<Len;j++)
{
sum=0;
for(k=1;k<=Order;k++)
{
if((j-k)>=0)
sum=sum+(b[k]*y[j-k]);
}
if(j<=Order)
{
y[j]=a[j]-sum;
}
else
{
y[j]=-sum;
}
printf("Respose[%d] = %f\n",j,y[j]);

}
}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top