|
发表于 2011-11-29 22:07:57
|
显示全部楼层
回复 2# wzliniam
8 _8 n2 v: V* i3 K4 z N那inc0用就可以用inc代替了吗?说明书里的区别不太懂……麻烦讲解一下,谢谢7 X, i# r1 [# z; [" o: q
7 h2 f7 a" {9 Q# O! J7 M" W5 ~inc(varnm) = expr' ^8 W% A& j; }" k6 V$ x
Definition of the initial condition of variable varnm. If inc(varnm) is not defined, the normal assignment expression will be evaluated (only possible if varnm is of the intern or input type). If inc(varnm) is defined, it will be evaluated when the model resets.
! {& D9 H+ s/ q8 M: s2 d4 d! b' L f+ R+ J, S" u
inc0(varnm) = expr
) b8 \0 r) t9 m# a7 Y7 u9 k. HDefinition of the initial condition of variable varnm, for unconnected output or input variables. This variant of the inc() statement is used only when the variable varnm could not be initialized through the initial condition of the connected input or output signal. The inc0() statement is thus used to make open input or output terminals possible. |
|