//this code is for find poles and zeros in z-plane
clc;
clear;
close all;
num=input('Enter numerator coeff :-');
den=input('Enter denomenator coeff :-');
H=filt(num,den);
z=zero(H);
disp('zeros are at:-');
disp(z); %find residue,pole location
[r,p,k]=residuez(num,den);
disp('poles are at:-');
disp(p);
zplane(num,den);
H1=tf(num,den);
[p1,z1]=pzmap(H1);
disp('poles at:-');
disp(p1);
disp('zeros at:-');
disp(z1);
figure;
pzmap(H1); %plot of pole zero map in s plane
title('pole-zero map of LTI system in s-plane');
//end now run the code
//input
Enter the numerator:-[1 1]
Enter the denomenator:-[1 5 6]
Output is:-
zeros are at:-
0
-1
poles are at:-
-3.0000
-2.0000
poles at:-
-3.0000
-2.0000
zeros at:-
-1
clc;
clear;
close all;
num=input('Enter numerator coeff :-');
den=input('Enter denomenator coeff :-');
H=filt(num,den);
z=zero(H);
disp('zeros are at:-');
disp(z); %find residue,pole location
[r,p,k]=residuez(num,den);
disp('poles are at:-');
disp(p);
zplane(num,den);
H1=tf(num,den);
[p1,z1]=pzmap(H1);
disp('poles at:-');
disp(p1);
disp('zeros at:-');
disp(z1);
figure;
pzmap(H1); %plot of pole zero map in s plane
title('pole-zero map of LTI system in s-plane');
//end now run the code
//input
Enter the numerator:-[1 1]
Enter the denomenator:-[1 5 6]
Output is:-
zeros are at:-
0
-1
poles are at:-
-3.0000
-2.0000
poles at:-
-3.0000
-2.0000
zeros at:-
-1
No comments:
Post a Comment