MATLAB: How to split value in a cell

matchregexpsplit

hi…i have variable a() as 1×3 cell..inside this..i have
SAMPLE20130101_1101.txt
SAMPLE20130101_1101.txt
SAMPLE20130101_1101.txt
i need to split this to remove file extension(.txt) and save to a variable as
SAMPLE20130101_1101
SAMPLE20130101_1101
SAMPLE20130101_1101
any help?

Best Answer

v={'SAMPLE20130101_1101.txt'
'SAMPLE20130101_1101.txt'
'SAMPLE20130101_1101.txt'}
out=strrep(v,'.txt','')