You are on page 1of 1

clear all

close all
clc

num1=1;
dem1=[1,1.414,1];
w=0:0.01:pi;
tf1=freqs(num1,dem1,w);
mag=abs(tf1);
phaseangle= angle(tf1);

figure
subplot(2,1,1)
plot(w,mag);
xlabel("frequency")
ylabel("magnitude")
title("magnitude spectrum of tf1")
hold on
axis tight

subplot(2,1,2)
plot(w,phaseangle);
xlabel("frequency")
ylabel("phase angle")
title("phase angle spectrum of tf1")
hold on
axis tight

You might also like