how to delete empty entry from a table

3 ビュー (過去 30 日間)
Ayushi Saxena
Ayushi Saxena 2016 年 4 月 13 日
回答済み: Azzi Abdelmalek 2016 年 4 月 13 日
I have a table consisting of numbers & strings. I need to delete the rows which has empty string value in a particular column. I tried using c.Rollnumber=='' for selecting empty string but getting error.
Thanks

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 13 日
%------Example----------------
v={'a' 1 'k';'b' 2 '';'' 1 'v'}
w=cell2table(v)
%------the code---------------
a=table2cell(w)
idx=any(ismember(cellfun(@num2str,a,'un',0),''),2)
w(idx,:)=[]

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by