Posted By

Giauzar on 06/11/14


Tagged


Versions (?)

Loading dates & times into Matlab


 / Published in: MatLab
 

Load dates & times into Matlab as text files, then convert to datenum so I can do something useful with them.

  1.  
  2. directorypath='H:\SSW_scripts\';
  3.  
  4. %load in the data
  5. %=====================
  6. %text files in format 'dd mm yyyy hh mm s'
  7. disturbancetimes=load([directorypath,'CR_disturbance_time3.txt']);
  8.  
  9.  
  10. clear CR_d
  11. %convert time to datevec
  12. CR_d(:,1)=datenum(disturbancetimes(:,1),disturbancetimes(:,2),disturbancetimes(:,3),disturbancetimes(:,4),...
  13. disturbancetimes(:,5),disturbancetimes(:,6));

Report this snippet  

You need to login to post a comment.