MATLAB: How to delete a row from a cell aray, with empty cell as first column delete empty cells I have a cell aray with 2 columns. A={[7;8],6;[],19;[3;4;5;6],11;[],25;[4;5],58;[],63} I want to delete all rows which contain empty cells.How can I do that? Best Answer I think this is what you are after: The line of code below will call isempty on each row in the first column, and then trim A to only those rows that are not empty. >> A(~cellfun(@isempty, A(:,1)), :) ans = [2x1 double] [ 6] [4x1 double] [11] [2x1 double] [58] Related SolutionsMATLAB: Delete rows from cell array emptycells = cellfun(@isempty, yourcellarray); %find empty cells in the whole cell arrayyourcellarray(any(emptycells(:, [6 9]), 2), :) = []; %remove rows for which any of column 6 or 9 is empty MATLAB: Transposing the contents of the cell Let C be your cell. You can do the following:C = cellfun(@transpose,C,'un',0); Related QuestionConvert an 18×1 cell array in a 3×6 cell arrayInitializing a cell array in matlabDelete empty [] {1×7 cell} {1×2 cell}Combine a cell array of cell arrays to a single cell arrayManipulation of a cell array-If i have this cell matrix how can delete zero cell
Best Answer