Professional Documents
Culture Documents
187/190
MATLAB
Description
power
continued on next page
188/190
MATLAB
.
.
mod
rem
cos
sin
atan
atan2
sqrt
exp
log
log2
log10
abs
angle
real
imag
roots
sum
mean
std
var
Plotting
plot
stem
clf
cla
shg
close all
subplot
grid on
title
xlabel
ylabel
legend
axis
print
saveas
semilogx
semilogy
loglog
get
set
findobj
Audio
wavread
soundsc, sound
conjugate transpose
tranpose
itemwise operation, e.g. x.*y, sum(x.^
2)
modulus after division
remainder after division
189/190
MATLAB
Note that when using Octave (with SourceForge packages http://octave.sourceforge.net), spectrogram specgram, firpmord remezord, firpm remez.
190/190
MATLAB
0.5
0.12
0.13
0.14
300
200
100
0
0
2000
4000
0
20
Magnitude (dB)
Design an elliptic IIR lowpass filter with cut-off 0.3 and plot
the frequency response |H(ej )| and a pole zero diagram.
40
60
80
100
1000
2000
3000
Frequency (Hz)
4000
5000
1000
2000
3000
Frequency (Hz)
4000
5000
Phase (degrees)
Wp = 0.3; Ws = 0.36;
Rp = 0.5; Rs = 40;
[N, Wn] = ellipord(Wp, Ws, Rp, Rs);
[B, A] = ellip(N, Rp, Rs, Wn);
freqz(B, A);
zplane(B, A);
100
200
300
400
Wp = 3300 / (16000/2);
N = 15;
[B, A] = fir1(N, Wp, hamming(N+1));
[H, w] = freqz(B, A, 1024, 16000);
plot(w, abs(H));
0.8
0.6
0.4
Imaginary Part
0.2
0
0.2
0.4
0.6
0.8
1
1
0.5
0
Real Part
0.5