Too many Input Arguments error when using Transfer Functions and bodeplot()
Afficher commentaires plus anciens
This is my transfer function:
H1s =
1.25e04 s
----------------------
s^2 + 1.25e04 s + 1e10
Continuous-time transfer function.
(output from the MATLAB console)
When I try to do bodeplot(H1s) I get the error "Error using DynamicSystem/bodeplot (line 108) Too many input arguments."
Why is this? When I used bodeplot on a transfer function previously, it worked just fine.
11 commentaires
Ameer Hamza
le 18 Oct 2020
Modifié(e) : Ameer Hamza
le 18 Oct 2020
Can you show your code where you define a plot the transfer function. Also, can you show the output of
which bodeplot
Bradlee Harrison
le 18 Oct 2020
Modifié(e) : Bradlee Harrison
le 18 Oct 2020
Bradlee Harrison
le 18 Oct 2020
Bradlee Harrison
le 19 Oct 2020
Stephan
le 19 Oct 2020
What shows up for:
ver
Ameer Hamza
le 19 Oct 2020
I wonder if you bodeplot.m file somehow got edited. Can you run
edit bodeplot.m
and see if beginning of the file looks like this
function h0 = bodeplot(varargin)
%BODEPLOT Bode response plot of linear systems.
For reinstallation, did you delete the old files before reinstalling?
Walter Roberson
le 19 Oct 2020
I do not think bodeplot.m got edited. In R2019b, line 108, the one that displays the error, is a throw() inside a try/catch block, so it is the appropriate line to show up in the error message if something goes wrong inside the try/catch including in calls to lower-level routines. So we need to figure out where the real error is.
At the MATLAB command line command give the command
dbstop if caught error
and run the code and it should stop at the line that has the real error.
I speculate that you have a third-party toolbox that is interfering with some call in a lower-level routine. I would suggest experimenting with
restoredefaultpath
rehash toolboxcache
and then running the code again. If it works that time, then something third-party is almost certainly involved.
Bradlee Harrison
le 19 Oct 2020
Walter Roberson
le 19 Oct 2020
Ah! That would do it.
Which toolbox had its own line.m ? line() is used by plot() so I would have expected a lot of plotting trouble.
Réponses (0)
Catégories
En savoir plus sur Get Started with Control System Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
