diff options
Diffstat (limited to '3165/CH5/EX5.2')
-rwxr-xr-x | 3165/CH5/EX5.2/Ex5_2.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/3165/CH5/EX5.2/Ex5_2.sce b/3165/CH5/EX5.2/Ex5_2.sce new file mode 100755 index 000000000..8af9baf1c --- /dev/null +++ b/3165/CH5/EX5.2/Ex5_2.sce @@ -0,0 +1,22 @@ +//Example 5 . 2
+//Program to c a l c u l a t e FIR F i l t e r c o e f f i c i e n t s f o r the d i r e c t form s t r u c t u r e
+// k1=1/2 , k2=1/3 , k3=1/4
+clc ;
+U =1;
+k1 =1/2;
+k2 =1/3;
+k3 =1/4;
+a (3+U ,0+U) =1;
+a (1+U ,1+U)=k1;
+a (2+U ,2+U)=k2;
+a (3+U ,3+U)=k3;
+m=2,k=1;
+a(m+U,k+U)=a(m -1+U,k+U)+a(m+U,m+U)*a(m -1+U,m-k+U);
+m=3,k=1;
+a(m+U,k+U)=a(m -1+U,k+U)+a(m+U,m+U)*a(m -1+U,m-k+U);
+m=3,k=2;
+a(m+U,k+U)=a(m -1+U,k+U)+a(m+U,m+U)*a(m -1+U,m-k+U);
+disp (a(3+U ,0+ U), ' a ( 3 , 0 ) ' );
+disp (a(3+U ,1+ U), ' a ( 3 , 1 ) ' );
+disp (a(3+U ,2+ U), ' a ( 3 , 2 ) ' );
+disp (a(3+U ,3+ U), ' a ( 3 , 3 ) ' );
|