error) ss2tf is not read

조회 수: 2 (최근 30일)
Ji Hoon Kong
Ji Hoon Kong 2020년 5월 1일
댓글: Ameer Hamza 2020년 5월 3일
In this way, the ss2tf function is not read. Other computers can read the same code, but not mine. It has already been reinstalled for the third time and control system toolbox is also installed. What is the solution?
  댓글 수: 14
Ji Hoon Kong
Ji Hoon Kong 2020년 5월 3일
편집: Ameer Hamza 2020년 5월 3일
[num, den] = ss2tf(a,b,c,d);
output is
'a' is not unrecognized function or variable.
Ji Hoon Kong
Ji Hoon Kong 2020년 5월 3일
편집: Ameer Hamza 2020년 5월 3일
my matlab code is
m1 = 1;
m2 = 1;
k = 1;
t = linspace(0,10,173);
a =[0 1 0 0; -1*k/m1 0 k/m1 0;0 0 0 1; k/m2 0 -1*k/m2 0];
b = [0;1/m1;0;0];
c = [0 0 1 0];
%output measurement is the only x2
d = 0;
[num, den] = ss2tf(a,b,c,d);
step(num,den)
and output is
error occurance: ^ (line 51)
The dimensions are incorrect and the matrix cannot be rounded. Verify that the matrix is square and the exponential value is scalar. To perform matrix power operations by element, '.Please use '^'.
error occurance: poly (line 2)
output=x^3+x^2+x+1;
error occurance: ss2tf (line 30)
den = poly(p);
error occurance: asdfg (line 10)
[num, den] = ss2tf(a,b,c,d);

댓글을 달려면 로그인하십시오.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 5월 3일
Ah!! You see. Posting the full error message made the problem clear. You have defined a function named 'poly'. MATLAB also has a function named poly. This confuses MATLAB. Change the name of your function to something else.
Type
which poly -all
it will give you a list of functions. One of those functions was created by you. Change its name to something else.
  댓글 수: 2
Ji Hoon Kong
Ji Hoon Kong 2020년 5월 3일
Thank you for your help. At first, only ss2tf appeared to be an error without these errors, so I thought it was not the cause. I wish you good health.
Ameer Hamza
Ameer Hamza 2020년 5월 3일
I am glad to be of gelp.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by