Apply a digital filter (direct form II transposed): Difference between revisions

m
→‎version 1: changed some comments and whitespace.
m (→‎version 1: changed some comments and whitespace.)
Line 740:
do i=1 for N /*process each of the vector elements. */
#=0 /*temp variable used in calculations. */
do j=1 for words(@b); if i-j >= 0 then #= # + /*process allword(@b, ofj) the * B word(@s, coefficients. */i-j+1)
end /*j*/ if i-j >= 0 then #=# + word(@b, j) /* word(@s,[↑] i-j+1) process all the B coefficients.*/
end /*j*/
 
do k=1 for words(@a); _=i - k + 1; /*process all ofif thei-k >= A0 coefficients.then #=# - word(@a, k) */ $._
end /*k*/ if i-k >= 0 then #=# - word(@a, k) /* $[↑] process all the A coefficients._*/
$.i= # / word(@a ,1); endcall tell /*konly display using half the dec digs.*/
$.i=#/word(@a ,1); call tell /*only display using half the dec digs.*/
end /*i*/
exit /*stick a fork in it, we're all done. */