I've tried using MATLAB R2023b to generate bode plots and calculate DC gains of transfer function but I keep on receiving an error message: 'Wrong number of input arguments'

8 ビュー (過去 30 日間)
syms s
b = (s + 1)/(s + 100)
b =
(s + 1)/(s + 100)
>> k = dcgain(b)
Error using dcgain
Wrong number of input arguments.
>> bode(b)
Error using bode
Not enough input arguments.

回答 (1 件)

Star Strider
Star Strider 2023 年 10 月 19 日
Wrong syntax. Use the tf function, not syms for Control System Toolbox functions.
Try this instead —
s = tf('s');
b = (s + 1)/(s + 100)
b = s + 1 ------- s + 100 Continuous-time transfer function.
k = dcgain(b)
k = 0.0100
bode(b)
grid
.
  2 件のコメント
Joel Davis
Joel Davis 2023 年 10 月 19 日
Thank you! Just realised my mistake.
Star Strider
Star Strider 2023 年 10 月 19 日
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by