clear all
clc
syms s
K=1;
Gnum=(50/3)*K;
Gden=sym2poly((s+5)*(s+(10/3))*(s+2));
G=tf(Gnum,Gden);
H=20/(s+20);
figure
rlocus(G*H*K);
T=feedback(G*K,H);
figure
step(T)
figure
rlocus(T)
Error using * (line 80)
Invalid operand. Variables of type "sym" cannot be combined with other models.
Error in rootlocusKanalysis (line 16)
rlocus(G*H*K);

 채택된 답변

Walter Roberson
Walter Roberson 2021년 1월 12일

0 개 추천

You can never create a tf directly from something symbolic.
s = tf('s');
K=1;
Gnum=(50/3)*K;
Gden=(s+5)*(s+(10/3))*(s+2);
G=tf(Gnum,Gden);
H=20/(s+20);
figure
rlocus(G*H*K);
T=feedback(G*K,H);
figure
step(T)
figure
rlocus(T)

댓글 수: 3

Isyraf Izuddin
Isyraf Izuddin 2021년 1월 12일
편집: Isyraf Izuddin 2021년 1월 12일
I follow the coding from this YouTube video there no error when use his equation but when i try using our group equation there is error.
I am a student Please help me
and I also attach my assignment question
In that video, at no point does the speaker use a symbolic H.
clear all
clc
syms s
K=1;
Gnum=(50/3)*K;
Gden=sym2poly((s+5)*(s+(10/3))*(s+2));
G=tf(Gnum,Gden);
Hnum = 20;
Hden = sym2poly(s+20);
H=tf(Hnum,Hden)
H = 20 ------ s + 20 Continuous-time transfer function.
figure
rlocus(G*H*K);
T=feedback(G*K,H);
figure
step(T)
figure
rlocus(T)
Isyraf Izuddin
Isyraf Izuddin 2021년 1월 12일
Thank you very much... very appriciate your help... may Allah bless you...

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Troubleshooting에 대해 자세히 알아보기

태그

질문:

2021년 1월 12일

댓글:

2021년 1월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by