"Axis" function error

2 次查看(过去 30 天)
kale
kale 2022-10-3
编辑: dpb 2022-10-5
I'm using axis function but there is this error:
How do I solve it?
Thanks!

采纳的回答

dpb
dpb 2022-10-3
编辑:dpb 2022-10-5
-3 < 0 despite abs(3) being greater -- as the error message says, the axis limits have to be in strictly ascending order numerically, not in the order they appear on the drawn figure above...
Unfortunately we can't copy/paste figures instead of text, but the culprit line above should be
%axes([0 20 k 0])
when k<0
You don't need an axis command here at all, though, it will be created automagically when call
k=-3;tau=4;
G=tf(k,[tau 1]);
step(G)
xlim([0 20])
is simpler way to get there, anyway...

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by