%  Example 2.6.  Computes the closed loop poles.
clear
%  Define the plant.
nup=[1 0];
dep=[1 -1];
%  Define the controller.
nuc=2;
dec=[1 0];
%  Generate the closed loop transfer function from R to Y.
[nuyr,deyr]=feedback(nup,dep,nuc,dec)
zerosyr=roots(nuyr)
polesyr=roots(deyr)
%  Generate the closed loop transfer function from V to U.
[nuuv,deuv]=feedback(-nuc,dec,nup,dep,+1)
zerosuv=roots(nuuv)
polesuv=roots(deuv)
%  The resulting poles are found by deleting the pole zero cancellations.
