MATLAB: Removing rows from MyFolderInfo = dir(‘thefolder’) before specific date

struct

Having applied the code:
MyFolderInfo = dir('myfolder') ;
and having thus created the struct "MyFolderInfo" with 5 fields containing information about the content of my directory, I now want to update the list. In particular, I wish to remove from "MyFolderInfo" all rows for the files that were updated before a specific date.
How is this done?

Best Answer

myDate = '10-Jul-2015';
myDateNum = datenum( myDate );
MyFolderInfo( [ MyFolderInfo.datenum ] < myDateNum ) = [];