MATLAB: How do i check for empty cells within a list

cellemptyMATLAB

How do i check for empty cells within list? I have a list of cells, namelist, and it has 12 values, i need to check if some of the cells are empty. Thanks

Best Answer

%Build Cell array (note the curly brackets)
A{1,1} = [1 4 3; 0 5 8; 7 2 9];
A{1,2} = 'Anne Smith';
A{2,1} = 3+7i;
A{2,2} = [];
Use the isempty function
isempty(A{2,2}) %Note the difference "{" and "(" brackets
This function will return 1.
Hope this helps. Nate