将他们弄成fcn的形式,然后如1楼所说在分母上加eps,注意打个括号。
里面的表达式如:(D/((u(3)*u(3))-1)+eps),意思就是在分母上加个小量eps,从而避免除0.表达式根据你的情况而定,我这是我自己的一个东西。
这几个警告都没什么,不用担心。
using
a
default
value
of
0.2
for
maximum
step
size.
the
simulation
step
size
will
be
limited
to
be
less
than
this
value.这是因为你没有设置仿真最大步长,因此simulink使用了默认步长0.2s。
warning:
the
model
'mz10291'
does
not
have
continuous
states,
hence
using
the
solver
'variablestepdiscrete'
instead
of
the
solver
'ode45'
specified
in
the
configuration
parameters
dialog.这是说你的模型当中不含连续状态,因此使用了变步长离散求解器,而不是仿真的默认求解器ode45(4阶5级龙格-库塔法)。
在分母上加eps。eps在MATLAB里面代表一个接近于零的数,就是为了防止楼主说的情况的。你可以在MATLAB里面试一下,输入eps然后回车,eps=2.2204e-016。
## 这是markdown啊
但是符号如果是负号, 负数加上eps是不是也可以变成分母为0啊