Problem in displaying a substring
古いコメントを表示
Problem in displaying a substring
Ex: I have this line:-
C:\abc\xyz\myName_1.wav
I want to display only 'myName' from this line
採用された回答
その他の回答 (1 件)
Grzegorz Knor
2011 年 12 月 30 日
doc fileparts
doc strfind
2 件のコメント
Grzegorz Knor
2011 年 12 月 30 日
In your case:
[pathstr, name, ext] = fileparts('C:\abc\xyz\myName_1.wav')
idx = strfind(name,'_')
disp(name(1:idx-1))
Nishat Anjum Shaikh
2011 年 12 月 30 日
カテゴリ
ヘルプ センター および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!