% FILE: rootLocusIntuitive2_0_011719a.m
% DATE: 01/17/19 20:39
% AUTH: P.Oh
% DESC: Root Locus plot for an intuitive system

% An OLTF for a hypothetical first order cruise control

%                1   
%   G(s) = ------------
%           (1000s+50) 


% Define OLTF

golTfNum = [1];
golTfDen = [1000 50];

golTf = tf(golTfNum, golTfDen)

% In factored (i.e. zero and pole) form

% zpk(G)

% Display root locus for OLTF lag compensated version.  Use rlocusplot so can add title etc

handleRootLocusPlot = rlocusplot(golTf);
plotOptions = getoptions(handleRootLocusPlot);
plotOptions.Title.String = 'RL for first order DC motor';
% plotOptions.XLim = [-4 2];
% plotOptions.YLim = [-3 3];
setoptions(handleRootLocusPlot, plotOptions);


