Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ref:octave:filter_design [2017/02/25 18:08]
mike
ref:octave:filter_design [2018/05/31 22:06]
mike
Line 2: Line 2:
  
 <code matlab> <code matlab>
 +# do this one time
 +pkg install control-3.1.0.tar.gz
 +pkg install signal-1.4.0.tar.gz
 +
 pkg list pkg list
 pkg update pkg update
Line 12: Line 16:
 pkg load signal pkg load signal
  
-Simple but has a large transition band and only about 50 to 60 db attenuation+Simple but has a large transition band and only about 50 to 60 db attenuation
 freqz(fir1(63,​0.125)) freqz(fir1(63,​0.125))
 </​code>​ </​code>​
 +
 +The parks McClellan algorithm incorporates both the Remez exchange algorithm and the Chebyshev approximation theorem to achieve an optimal fit between your desired and actual filter response. ​
  
 <code matlab> <code matlab>
---- Parks-McClellan lowpass Filter+--- Parks-McClellan lowpass Filter
 n = 64 n = 64
 f = [0.0 0.3 0.4 1.0 ]; f = [0.0 0.3 0.4 1.0 ];
Line 32: Line 38:
 === Example of 100dB filter === === Example of 100dB filter ===
 <code matlab> <code matlab>
-example of 100dB filter+example of 100dB filter
 f = [0.0 0.1 0.2 1.0 ]; f = [0.0 0.1 0.2 1.0 ];
 a = [1.0 1.0 0.0 0.0]; a = [1.0 1.0 0.0 0.0];