# rlocus() - Not enough input arguments in MATLAB 2018a

I am following this tutorial on root locus methods and when writing:

syms s
sys = 1/(3*s^2 + 2*s - 1);
rlocus(sys)


I get:

Error using rlocus
Not enough input arguments.

Why is rlocus expecting more input arguments when the documentation states that one input argument is enough?

rlocus(SYS) computes and plots the root locus of the single-input, single-output LTI model SYS. The root locus plot is used to analyze the negative feedback loop

Syntax for rlocus:

rlocus(sys)
rlocus(sys1,sys2,...)
[r,k] = rlocus(sys)
r = rlocus(sys,k)


When writing:

s = tf('s');
P = 1/(3*s^2 + 2*s - 1);
rlocus(P)


I get:

Error using InputOutputModel/subsref (line 43) The name "s" does not match any channel or group.

Error in s = tf('s');

so I am using syms s which is used to define symbolic variables.

Strangely which rlocus returns ...Program Files\MATLAB\R2018a\toolbox\control\ctrlobsolete\rlocus.m which is in the obsolete folder.

• >> Num=1; >> Den=[3 2 -1]; >> G=tf(Num,Den); >> rlocus(G) – Chu Dec 27 '18 at 15:00
• @Chu, this seems correct as per documentation but gives me the error Subscript no. 2 is out of range.. I am unable to determine why this is happening. – Rrz0 Dec 27 '18 at 15:23
• Have you run my progam? I've run that exact program on Matlab 2018 and it works fine. Is control systems toolbox in the obsolete folder? If so, it wont work! – Chu Dec 27 '18 at 16:01
• Try 'help rlocus' instead of 'which rlocus'. I've not seen the latter command before. – Chu Dec 27 '18 at 16:10
• Thanks for your comments, they helped me solve the pending issue. which is a handy command which is used to locate functions and files. help rlocus now gives the expected help on how to use the function. – Rrz0 Dec 27 '18 at 16:12

sys = tf([1],[3 2 -1]);

• Thanks for your answer. That still gives me an error on MATLAB 2018a: Subscript no. 2 is out of range. – Rrz0 Dec 27 '18 at 14:49
• Thanks for your comments and answer. Turns out I was using an obselete version of rlocus. – Rrz0 Dec 27 '18 at 16:02