MATLAB: How to read a string character by character

fileread datatext file

I have a file name as CCTV03x456x1658.avi. And i want to read only 'CCTV03x456x1658' before the '.avi' and exclude the '.avi part. How can I achieve this?

Best Answer

s='CCTV03x456x1658.avi'
s=s(1:strfind(s,'.')-1)