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!
