There is actually an rlocus function in Control System Toolbox.
>> rlocus(G)
If you want to do all the work yourself for some other reason:
k=0:0.1:20;
for idx = 1:numel(k)
closedLoop = feedback(G,k(idx));
p(:,idx) = pole(closedLoop);
end
figure
hold on
plot(real(p'),imag(p'))
- Sebastian
