save tic toc in duration style
Hi all, I would like to save my computational time using tic toc but in format duration (i am trying to use duration but I don’t know how to save it).
Here is my code, so far I just get the time in second, and exact time give me number separate by comas. What I want to get is something like
1 hour 20 second saving in txt file. Do you guys can help me?
close all, clc, clear all
tStart = tic;
a=load(‘PE_201507_LPF7Hz_m5L3.dat’);
plot(a)
tEnd = toc(tStart)
tEnd = toc(tStart);
time_exec=datevec(tEnd./(60*60*24)) %change time in tictoc to
name=sprintf(‘exec_time.txt’)
dlmwrite (name,time_exec);Hi all, I would like to save my computational time using tic toc but in format duration (i am trying to use duration but I don’t know how to save it).
Here is my code, so far I just get the time in second, and exact time give me number separate by comas. What I want to get is something like
1 hour 20 second saving in txt file. Do you guys can help me?
close all, clc, clear all
tStart = tic;
a=load(‘PE_201507_LPF7Hz_m5L3.dat’);
plot(a)
tEnd = toc(tStart)
tEnd = toc(tStart);
time_exec=datevec(tEnd./(60*60*24)) %change time in tictoc to
name=sprintf(‘exec_time.txt’)
dlmwrite (name,time_exec); Hi all, I would like to save my computational time using tic toc but in format duration (i am trying to use duration but I don’t know how to save it).
Here is my code, so far I just get the time in second, and exact time give me number separate by comas. What I want to get is something like
1 hour 20 second saving in txt file. Do you guys can help me?
close all, clc, clear all
tStart = tic;
a=load(‘PE_201507_LPF7Hz_m5L3.dat’);
plot(a)
tEnd = toc(tStart)
tEnd = toc(tStart);
time_exec=datevec(tEnd./(60*60*24)) %change time in tictoc to
name=sprintf(‘exec_time.txt’)
dlmwrite (name,time_exec); tic toc, duration MATLAB Answers — New Questions