MATLAB: How to delete empty entry from a table conditional deletiontables 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 Best Answer %------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,:)=[] Related SolutionsMATLAB: Strcmp for two different Cells Use ismember:var1 = {'A', 'B', 'C'}var2 = {'A', 'AA', 'B', 'BB', 'BB' , 'U' , 'V' , 'W'}ismember(var2, var1) MATLAB: Controlling array data when calculating Another way is to just delete the element where w=0:w(w==0) = []; Related QuestionCreate a table of one vector and a matrixHow to convert all the cell in a columns from char to stringHow to find a corresponding matrix valueCells merging in tableUse regexp to split table columns
Best Answer