Too many Input Arguments error when using Transfer Functions and bodeplot()
显示 更早的评论
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 个评论
Ameer Hamza
2020-10-18
编辑:Ameer Hamza
2020-10-18
Can you show your code where you define a plot the transfer function. Also, can you show the output of
which bodeplot
Bradlee Harrison
2020-10-18
编辑:Bradlee Harrison
2020-10-18
Bradlee Harrison
2020-10-18
Bradlee Harrison
2020-10-19
Stephan
2020-10-19
What shows up for:
ver
Ameer Hamza
2020-10-19
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
2020-10-19
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
2020-10-19
Walter Roberson
2020-10-19
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.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Get Started with Control System Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
