how to split value in a cell

조회 수: 5 (최근 30일)
sandy
sandy 2014년 1월 16일
댓글: sandy 2014년 1월 16일
hi...i have variable a() as 1x3 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?

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 1월 16일
편집: Azzi Abdelmalek 2014년 1월 16일
v={'SAMPLE20130101_1101.txt'
'SAMPLE20130101_1101.txt'
'SAMPLE20130101_1101.txt'}
out=strrep(v,'.txt','')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by