MATLAB: Convert ordered date to formal matlab date

convert ordered dates to formal dates

How to convert the following sequence of date to formal y/m/d or Matlab date format

Best Answer

  • Note that you'd still need the year. But if you know that then:
    your_date = datenum(your_year-1, 12, 31, 0, 0, 0) + ordinal_day;
    Ordinal_day goes from 1 to 365.