how to delete rows of the character '' from a column or column vector
2 ビュー (過去 30 日間)
古いコメントを表示
AbelM Kusemererwa
2015 年 6 月 22 日
コメント済み: AbelM Kusemererwa
2015 年 6 月 22 日
how to delete rows of the character '' from a column or column vector
e.g column_vector={'2';'3';'';'54';'';'';'';'4';'19'} to become column_vector={'2';'3';'54';'4';'19'}
4 件のコメント
Guillaume
2015 年 6 月 22 日
編集済み: Guillaume
2015 年 6 月 22 日
if the column_vector is a cell array as in the example provided, then the '' character is not a character at all, but an empty string which is detected by isempty. See Azzi's answer.
if the column_vector is a truly a column vector, it is a char array. Then the '' character may very well be a character which can be removed according to James' answer.
Using proper terminology helps in getting the right answer.
採用された回答
Azzi Abdelmalek
2015 年 6 月 22 日
s={'' ;12;'';'5 '; '6';' abc';'rt';;''}
s(cellfun(@isempty,s))=[]
3 件のコメント
Azzi Abdelmalek
2015 年 6 月 22 日
編集済み: Azzi Abdelmalek
2015 年 6 月 22 日
It's Azzi, not Aziz. post a sample of this column
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!