Not enough input arguments with transfer function operations

3 次查看(过去 30 天)
Hi, I'm trying to use the Control System Designer to tune a simple PID controller. But when I open it, I get the following error:
Error using controlSystemDesigner (line 259)
Not enough input arguments.
This happens both by clicking the App icon and by calling It through the command line with or without a transfer function argument. The same happens with sisotool().
Trying to trace the error I noticed that I can no longer operate transfer functions. Running the following code,
>> s = tf([1 0], 1);
>> s*s
results in this error,
Error using * (line 80)
Not enough input arguments.
The same happens with any other transfer function operation. I tried unninstalling and reinstalling Matlab, but nothing changed. I'm currently using version 2021a.

采纳的回答

Paul
Paul 2022-3-28
编辑:Paul 2022-3-28
Maybe tf is shadowed on your path. Does the output of the which command look like this:
which tf -all
/MATLAB/toolbox/control/ctrlmodels/@tf/tf.m % tf constructor /MATLAB/toolbox/control/ctrlmodels/@DynamicSystem/tf.m % Shadowed DynamicSystem method /MATLAB/toolbox/ident/ident/@idParametric/tf.m % Shadowed idParametric method /MATLAB/toolbox/mpc/mpc/@mpc/tf.m % Shadowed mpc method /MATLAB/toolbox/shared/controllib/engine/@StaticModel/tf.m % Shadowed StaticModel method
  6 个评论
Tomas Salvadores Viertel
编辑:Tomas Salvadores Viertel 2022-3-28
I managed to find the root of the problem!
I had defined a function file called conv.m without noticing that Matlab (or one of my installed packages) has a predefined conv function for convolutions. This seems to have caused some conflicts, resulting in the described issues.
Thanks for taking time to help me.
Paul
Paul 2022-3-28
编辑:Paul 2022-3-28
I'm pretty sure my installation has all products. Maybe something changed for 2022 on Answers compared to Tomas's version (unknown) and my local installation (2021b).
Why does answers show everything as "Shadowed" except the first output, which is not the case on Tomas's output or mine (see below)?
Any idea why Tomas's list shows a file lftdataSS.m, which isn't tf.m?
Here's what I get on my local installation:
>> ver Matlab
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.11.0.1769968 (R2021b)
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.11 (R2021b)
>> which tf -all
C:\Program Files\MATLAB\R2021b\toolbox\control\ctrlmodels\@tf\tf.m % tf constructor
C:\Program Files\MATLAB\R2021b\toolbox\control\ctrlmodels\@DynamicSystem\tf.m % DynamicSystem method
C:\Program Files\MATLAB\R2021b\toolbox\shared\controllib\engine\+ltipack\@tfdata\tf.m % ltipack.tfdata method
C:\Program Files\MATLAB\R2021b\toolbox\ident\ident\@idParametric\tf.m % idParametric method
C:\Program Files\MATLAB\R2021b\toolbox\mpc\mpc\@mpc\tf.m % mpc method
C:\Program Files\MATLAB\R2021b\toolbox\shared\controllib\engine\@StaticModel\tf.m % StaticModel method
This output is kind of similar to Tomas's, but not the same. In particular, this list doesn't include the other +ltipack files, even though I actually have them. For example
>> exist('C:\Program Files\MATLAB\R2021b\toolbox\shared\controllib\engine\+ltipack\@ssdata\tf.m')
ans =
2
Any thoughts why my list doesn't show the other +ltipack files?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Classical Control Design 的更多信息

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by