replace the string a cell array with empty cell
2 ビュー (過去 30 日間)
古いコメントを表示
Gopalakrishnan venkatesan
2015 年 5 月 7 日
コメント済み: Iason Grigoratos
2016 年 12 月 21 日
I have a cell array a = {'abc' ; 'def' ; 'ghi' ; 'def' ; 'xyz'}
I need to replace a 'def' with empty cell.
so my answer should be a = {'abc' ; '' ; 'ghi' ; '' ; 'xyz'}
How can i do this using cell function?
thank you
0 件のコメント
採用された回答
Nobel Mondal
2015 年 5 月 7 日
You may directly use the strrep function
a = strrep(a, 'def', '');
2 件のコメント
その他の回答 (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!