%
% Filename: example5.m
%
% Description: M-file demonstrating matlab functions rlocus() which
% plots root locus and rlocfind() which allows selection
% of points on root locus so that corresponding parameter
% value is returned.
%
clear; clf; % clear memory and figures
p = [1]; % numerator of G(s)
q = [1 3 2 0]; % denominator of G(s)
rlocus(p,q); % plot root locus for CL system
title('Example 5: Sample Root Locus Plot');
rlocfind(p,q) % allow user to select CL pole
% location, so that corresponding
% controller gain is returned
MATLAB Response Generated:
Select a point in the graphics window
selected_point =
-0.0046 + 1.4035i
ans =
5.8914
MATLAB Plot Generated: