how to get current running time in a stateflow , ?
21 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
with Matlab 2010b I just use " t" for cureeent time, but in higher version, this " t" never works
3 Commenti
Risposta accettata
Niels
il 6 Gen 2017
Modificato: Niels
il 6 Gen 2017
if i did not missread u asked first for current time...
>> tic
x=1;
for i=1:10
x=x*i;
end
timeNeeded=toc
timeNeeded =
0.0099
c=clock
c =
1.0e+03 *
2.0170 0.0010 0.0060 0.0130 0.0250 0.0237
>> fix(c)
ans =
2017 1 6 13 25 23
>> currentTime=(fix(c(4:6)))
currentTime =
13 25 23
Più risposte (1)
CognitiveBias
il 7 Mag 2019
't' is a supported time symbol for C action language only.
For MATLAB action language use 'getSimulationTime()'.
0 Commenti
Vedere anche
Categorie
Scopri di più su Simulink Functions 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!