Program in Scilab (is similar to the program 5.10 but as the program changes the input and how introduce the system):
num=poly([1 0 0],'s','coeff');
den=poly([1 1 1],'s','coeff');
t=0:0.1:7;
g=syslin('c',num/den);
gs=csim(t,t,g);
clf;
plot(t,gs,'+');
plot2d(t,t)
xgrid;
xtitle('Response to unit-ramp, G(s)=1/(s^2+s+1)'
,'t(seg)','Input and output');
xstring(1.8,3,'Input');
xstring(4.4,3,'Output');
|
|