Hello,
I have a cell containing two cell columns. Column 1 is date and Column 2 is hour. I want to merge them together and transfrom date/time to the Matlab format. I am using a 'for' loop to do this, because I wasn't able to do it using 'cellfun'. This is the code:
for i=1:385521
PT{1}{i,1} = datenum(strcat(PT{1,1}{i,1},PT{1,2}{i,1}),'dd.mm.yyyyHH');
end
This works, but it takes about 6 minuts to do this operation. Could you give me some suggestions on how to optimize this operation. Even better if it is not in a loop.
Thanks, DjR
1 Comment
Direct link to this comment
https://la.mathworks.com/matlabcentral/answers/177047-optimizing-a-for-loop#comment_265304
Direct link to this comment
https://la.mathworks.com/matlabcentral/answers/177047-optimizing-a-for-loop#comment_265304
Sign in to comment.