MATLAB: Split file name (alphanumeric name)


I have a file names like: CAN20111230T134021UTC.mat
I need to split the file name and consider the files with month(12) i.e., 12.mat and run the loop based on that.
Could anyone please help me with this. Thanks in advance

Best Answer

  • The month is filename(8:9). You can extract that out of the full file name. However I don't know what "consider" means. You have files with names like CAN20111230T134021UTC.mat, but do you have or not have files with names like 12.mat? If you don't have them, then do you need to create them? Please explain exactly what "consider" means to you.