If I am runing a code has several iterations, Can I get the time of simulation after running for many minutes ?

2 次查看(过去 30 天)
Simply, I want after stopping my simulation I want to show me the real time that took it
for example, 10 minutes
thanks in advance

采纳的回答

Image Analyst
Image Analyst 2022-4-17
startingTime = tic
% Your code
elapsedSeconds = toc(startingTime)
message = sprintf('The elapsed time = %.1f minutes.', elapsedSeconds/60);
uiwait(helpdlg(message));

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by