Bode diagram : Warning: Error occurred while evaluating listener callback.

5 次查看(过去 30 天)
I wrote the following code, I am gettign this error:
Warning: Error occurred while evaluating listener callback.
Here is the code:
w_0 = 100
D = 10
K = 26.5;
s = tf('s');
G = w_0/(s^2 + 2*D*w_0*s + w_0^2)
bode(G)
%pole(G)
%pzmap(G)
grid on
hold on
margin(K*G);
legend('Open-loop','Open-loop with gain K')
hold off
I would be greatful for any feedback!

采纳的回答

Star Strider
Star Strider 2023-5-9
Your code runs without error in R2023a.
Perhaps an upgrade is in order —
w_0 = 100;
D = 10;
K = 26.5;
s = tf('s');
G = w_0/(s^2 + 2*D*w_0*s + w_0^2)
G = 100 -------------------- s^2 + 2000 s + 10000 Continuous-time transfer function.
bode(G)
%pole(G)
%pzmap(G)
grid on
hold on
margin(K*G);
legend('Open-loop','Open-loop with gain K')
hold off
.
  2 个评论
Star Strider
Star Strider 2023-5-9
Be sure all the updates to R2020a are installed, since they may have fixed that particular problem.
If there are still problems after that, it may be necessary to upgrade to a more recent version/release.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Digital Filter Analysis 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by