Why do I get this error: 'Undefined function 'ss' for input arguments of type 'double'.?

close all
clear all
clc
A1=1;
A2=0.5;
A3=(1/3);
R1=60;
R2=30;
R3=24;
w= 0.0167;
u=0.0333;
A=[(-1/(R1*A1)) 0 0; 1/(R1*A1) (-1/(R2*A2))-(1/(R3*A2)) 1/(R3*A2); 0 1/(R3*A3) -1/(R3*A3)];
B=[1/A1; 0; 1/A3];
C=[1 0 0; 0 1 0; 0 0 1];
D=[0; 0; 0];
sys=ss(A,B,C,D);
figure(1)
step(sys,300)

 採用された回答

Walter Roberson
Walter Roberson 2017 年 11 月 30 日

1 投票

That code requires the Control System Toolbox; https://www.mathworks.com/help/control/ref/ss.html be installed and licensed.

6 件のコメント

Jens De Winne
Jens De Winne 2017 年 11 月 30 日
Fixed it, thanks!
Paul Wintz
Paul Wintz 2022 年 11 月 3 日
One would think that MathWorks would actually state this in the ss documentation🙄
Walter Roberson
Walter Roberson 2022 年 11 月 3 日
That is implied by the fact that ss is documented as part of the Control System Toolbox.
In nearly all cases, if a function is documented under a particular toolbox, then you need that toolbox to be installed and licensed to use that function in the way documented. (There might be class methods belonging to other classes that have the same function name, but those are technically considered different functions.)
The exception to this is that there are a small number of utility functions that are provided with two or more toolboxes, and which are not class methods: in such cases, you only have to have one of the relevant toolboxes installed and licensed to use the function. I have noticed about 3 functions like this, but no particular functions like this come to mind at the moment.
Paul Wintz
Paul Wintz 2022 年 11 月 3 日
Sure, it's implied by the fact that it's technically within the Control System Toolbox documentation, but that's not made at all clear with in the ss documentation itself. You either have to notice the "control" in the URL or open the sidebar and put to the pieces together that the links to the Control Systems Toolbox indicates that this function is in that toolbox.
What I expect when I read documentation is a clear statement of where a function is from, it it isn't a builtin MATLAB function. In particular, I assumed that the version history section would tell me what the requirement is to call the function. All it says, though, is "R2006a" without indicating that it is a toolbox version R2006a.
Paul Wintz
Paul Wintz 2022 年 11 月 3 日
Especially considering that almost 80 people have viewed this question in the last month.
Walter Roberson
Walter Roberson 2022 年 11 月 3 日
You can go to the bottom of the ss doc page and click on the rating button. When you do then a dialog will open giving you a chance to describe why you rated it that way. You can put in your recommendations there.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by