How can I fix the rltool and bode functions "too many input arguments" error?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
When I try to run the rltool or bode function, I get the error with "too many input arguments". Here is an example of running the code: >> s = tf('s')
s =
s
Continuous-time transfer function.
>> G = (s+2)/(s^2+s+4)
G =
s + 2
-----------
s^2 + s + 4
Continuous-time transfer function.
>> bode(G) Error using DynamicSystem/bode (line 95) Too many input arguments.
The same happens with rltool(G): >> rltool(G) Error using rltool (line 89) Too many input arguments.
I have tried uninstalling MATLAB 2017b and re-installing, and it has not solved the problem. I have also tried this on 2016a and 2017a. I have also passed with no input arguments to the bode function and get:
>> bode Here is an example of how the function bode works: Consider a randomly generated stable Transfer Function Model: of the form G(s)=num(s)/den(s): num = 0 -0.1022 0.0316 0.1934 -0.1795 0.1620 den = 1.0000 6.2190 50.6538 222.7866 359.5180 162.7478 Call bode using the following command (see also, help bode): bode(tf(num,den)); ans = 'Error using DynamicSystem/bode (line 95) Too many input arguments.'
0 comentarios
Respuestas (2)
Star Strider
el 18 de Nov. de 2017
Your code runs for me without error.
You probably have a variable named ‘bode’ in your workspace. Run this from your Command Window or a script:
which bode -all
If the first result is:
bode is a variable.
you have found the problem. (This is called ‘overshadowing’ of a function and is to ba avoided.)
The solution is to rename the variable to something that doesn’t share the same name as a function.
4 comentarios
eman salah
el 9 de Abr. de 2020
please somone assist what to do to resolve the same problem, i don't have any idea what to do.
0 comentarios
Ver también
Categorías
Más información sobre Get Started with Control System Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!