在下面的代码中,如果我改变(4 /([Zeta] * [Omega])),比如20,则不绘制任何内容。为什么? 如果我在开头删除两个滑块,则不会绘制任何内容
ClearAll[\[Zeta], \[Omega]]
{Slider[ Dynamic[\[Zeta]], {0.1, 1.4, 0.1}], Dynamic[\[Zeta]]}
{Slider[ Dynamic[\[Omega]], {1, 5, 0.1}], Dynamic[\[Omega]]}
tf[\[Omega]_, \[Zeta]_] :=
TransferFunctionModel[\[Omega]^2/(s^2 +
2 \[Zeta] \[Omega] s + \[Omega]^2), s]
f[t_] = OutputResponse[tf[\[Omega], \[Zeta]], UnitStep[t], t];
Manipulate[
Plot[f[t], {t, 0, (4/(\[Zeta]*\[Omega]))},
PlotRange -> {{0, (4/(\[Zeta]*\[Omega]))}, {0, 2}}], {{\[Zeta],
0.2}, 0.1, 1.4}, {{\[Omega], 1}, 0.5, 4}
]
答案 0 :(得分:1)
tf[o_, z_] := TransferFunctionModel[o^2/(s^2 + 2 z o s + o^2), s]
f[t_, o_, z_] = OutputResponse[tf[o, z], UnitStep[t], t];
Manipulate[Plot[f[t, o, z], {t, 0, 20}, PlotRange -> {0, 2}],
{{z, 0.2}, 0.1, 1.4}, {{o, 1}, 0.5, 4}]