OpenCores
URL https://opencores.org/ocsvn/sciir/sciir/trunk

Subversion Repositories sciir

[/] [sciir/] [trunk/] [Matlab/] [IIR.m] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ahmed.shah
close all
2
clear
3
clc
4
 
5
f = [0 0.25 0.35 1.0];      % Corner frequencies
6
m = [1 1 0 0];              % Filter magnitudes
7
n = 3;                      % Filter order
8
 
9
[b,a] = yulewalk(n, f, m);  % Design IIR Filter
10
 
11
[h,w] = freqz(b,a,128);     % FFT
12
 
13
figure
14
plot(f,m,w/pi,abs(h))       % Plot frequency response
15
 
16
figure
17
step(filt(b,a))             % Plot step response
18
 
19
figure
20
impulse(filt(b,a))          % Plot impuse response
21
 
22
figure
23
zplane(b,a)                 % Plot poles/zeros
24
 
25
[sos, g] = tf2sos(b, a);    % Second Order Sections
26
 
27
afx = num2fixpt(a, sfix(8), 2^-6);
28
bfx = num2fixpt(b, sfix(8), 2^-6);
29
fvtool(bfx, afx)
30
fvtool(b, a)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.