Program in Scilab:
num=poly([1 0 0 0],'s','coeff');
den=poly([0 1 1 1],'s','coeff');
t=0:0.1:7;
g=syslin('c',num/den);
gs=csim('step',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');
|
|