Azzera filtri
Azzera filtri

Accuracy of Simulation time

3 visualizzazioni (ultimi 30 giorni)
Shrirang
Shrirang il 23 Set 2014
Commentato: Shrirang il 23 Set 2014
Hi, I am facing an unexpected scenario while debugging. Sample time of my model is 0.002 (Discreet System). I am running a m file at each sample time in the background. following is my sample code. curTime is noting but current simulation time ----------------------------- if curTime == 1.400 a = 09; end ------------------------------ Now problem is after some time my simulation time is appearing as 1.40000000000000001 so if condition (if curTime == 1.400) is never getting satisfied. Can any body suggest a possible solution.

Risposta accettata

Sean de Wolski
Sean de Wolski il 23 Set 2014
  1 Commento
Shrirang
Shrirang il 23 Set 2014
Oh.. I got it !! I never thought i would face this. . Thank you ..

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Simulink in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by