%TimeResponse_1.m
%Effect of pole position
%First order system
%Impulse and Step response
%Introduction to:
%commands for zero/pole map
%- pzmap
%commands for system simulation
%- impulse
%- step


clc
echo on

a=input('\nEnter pole position: ');

%T(s)=-a/(s-a)
fprintf('\nT(s)=a/s+a\n')
num1=-a;
den1=[1 -a]
z1=roots(num1)
p1=roots(den1)
sys1=tf(num1,den1)
figure(1)
pzmap(sys1)
fprintf('\nPress a key to continue ... \n')
pause
figure(2)
impulse(sys1)
axis([0 10 0 abs(a)])
fprintf('\nPress a key to continue ... \n')
pause
figure(3)
step(sys1)
axis([0 10 0 1])

echo off

