If x>5 for y seconds, then z
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How can I write this in Matlab? Thanks.
If x>5 for y seconds, then z
2 comentarios
Image Analyst
el 22 de Nov. de 2022
You can invest 2 hours here and learn the basics:
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
Respuestas (1)
Image Analyst
el 22 de Nov. de 2022
What's wrong with tic and toc?
startTime = tic;
elapsedTime = toc(startTime);
loopCounter = 1;
while elaspedTime < 5
fprintf('Iteration %d.\n', loopCounter)
pause(0.4); % Waste some time.
elapsedTime = toc(startTime);
end
2 comentarios
Ver también
Categorías
Más información sobre Naming Conventions en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!