replaceing a specific character in a cell array of strings
9 ビュー (過去 30 日間)
古いコメントを表示
I have a cell array of {'12034' '10045' '24000' } I need to replace all the third characters by '.'. so I need {'12.34' '10.45' '24.00' }. thanks
0 件のコメント
回答 (1 件)
Walter Roberson
2012 年 5 月 10 日
cellfun(@(S) [S(1:2) '.' S(4:end)], YourCell, 'Uniform', 0)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!