X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fexamples%2Fexample7%2Ffilter_script.m;fp=dol%2Fexamples%2Fexample7%2Ffilter_script.m;h=dab0c8ab68f09c58d7e66804e57dc1ccdc5f6caf;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/examples/example7/filter_script.m b/dol/examples/example7/filter_script.m new file mode 100644 index 0000000..dab0c8a --- /dev/null +++ b/dol/examples/example7/filter_script.m @@ -0,0 +1,15 @@ +clear all; +close all; +clc; + +N = 3; +NUMBER_OF_SAMPLES = 5; +FILTER_COEFFICIENTS = [0.1 -0.1 0.4 1.0 -0.7 0.2 -0.9 -0.4 -0.8]; +x = [-9 4 -2 0 -3 0 8 3 6 0, ... + -7 -9 -5 2 1 2 8 -4 -6 -4]; + +%example 6 +y = filter(1, [1 -0.5], x(1:10)) + +%example 7 +y = filter(1, [1 -FILTER_COEFFICIENTS(1:N-1)], x (1:NUMBER_OF_SAMPLES))