ss2tf always outputs error with line 1, stopped working

1 回表示 (過去 30 日間)
SB
SB 2021 年 3 月 18 日
コメント済み: Steven Lord 2021 年 3 月 18 日
Hi, ss2tf was working fine and I was able to use it for my code successfully the first few times. However, for some reason, it stopped working and would always display the same error when I try to run my m-file:
This is the content of the said m-file, for your reference:
I've tried restarting MATLAB for so many times. I've also tried having my code run in other computers and it worked perfectly fine. If it's of any help, I'm using MATLAB R2020a, with a license provided by my university. The control system toolbox is also installed.
  1 件のコメント
Steven Lord
Steven Lord 2021 年 3 月 18 日
Let's make sure you're calling the ss2tf function provided by MathWorks and not another ss2tf.m that's shadowing it. Please execute this command and show us what it displays.
which -all ss2tf

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

回答 (1 件)

Star Strider
Star Strider 2021 年 3 月 18 日
You probably want:
[num,den] = ss2tf(A,B,C,D,1)
rather than:
[num,den] = ss2tf(A,B,C,D,l)
↑ ← NOTE THAT 'l' ~= 1
The same problem also appears to exist in the vectors and matrices themselves.
  2 件のコメント
SB
SB 2021 年 3 月 18 日
Hi, I've double checked the code and there seems to be no occurence of the character "l" replacing 1s. I've also had the same m-file run in other computers and they were able to run the code without any errors.
Star Strider
Star Strider 2021 年 3 月 18 日
Since you did not provide the actual code, only an image of it, there is no way we can determine what the problem is other than by looking at it.
Make it easy for us to help you, rather than absolutely impossible.

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

カテゴリ

Help Center および File ExchangeLicensing on Cloud Platforms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by