how to delete empty entry from a table
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!