Program in Scilab
num=poly([1 0 0 0],'s','coeff');
den=poly([0 5 4 1],'s','coeff');
g=syslin('c',num/den);
clf;
evans(g);
v=[-3 1 -2 2];
mtlb_axis(v)
sgrid([0.5],[0],32);
//mark a point with the mouse in
the root-locus of the graph
p=locate(1)
k=-1/real(horner(g,[1,%i]*p));
gl=1+k*g;
numgl=numer(gl);
roots(numgl)
k
Results:
-->p=locate(1)
p =
- 0.6502732
1.0550725
-->roots(numgl)
ans =
- 0.6412384 + 1.0505487i
- 0.6412384 - 1.0505487i
- 2.7175231
-->k
k =
4.1166111
|
|