engEvalString(pEng, "TLength = length(T); ");
engEvalString(pEng, "SimulinkTime = T(TLength);");
engEvalString(pEng, "Tt = T(TLength)" );
engEvalString(pEng, "Tt = T(TLength)" );
engEvalString(pEng, "Tt = T(TLength)" );
if( (fabs(F[0] - Fg) <= _Fdz) || (fabs(F[0] - Fg) <= 0.001) )
{
Yg = YBalanceStart;
Pg = PBalanceStart;
//AdanLee 081121 Add
TrnsptDelayInit = 0.0;
//AdanLee 081121
}
代码是这样的没问题,但是如果在
engEvalString(pEng, "SimulinkTime = T(TLength);");
engEvalString(pEng, "Tt = T(TLength)" );
engEvalString(pEng, "Tt = T(TLength)" );
engEvalString(pEng, "Tt = T(TLength)" );这几行中的任意一行后加//就出现线条错位了,不知道原因,但是在engEvalString(pEng, "TLength = length(T); ");后加就没有问题。
|