Thank you Walter and Steven.
Maybe I should have outlined my initial problem that I was trying to solve. I don't necessarily have to use evalc, but being a newbie in MATLAB I'm still trying to find my feet. Here goes:
In a directory filled with files, that are named something like this:
In addition to different years (e.g. 1957) and different codes (e.g. 008), the files have different date info (e.g. 14122017). All I want to do is scan this folder to just extract this date for the file where the pick_year and pick_code specified by the user matches. I think my code is a bit messy as I'm currently using a range of commands (str2double, extractBefore, strtrim and many others) to get this job done.
I don't need to download the file. Is there a more efficient way of scanning a directory and just extracting this date info based on the year and code specified by the user. Could you please let me know.
Thank you !!