MATLAB: Undefined operator ‘~=’ for input arguments of type ‘cell’.

cell

W is cell
contains cell values
in iteration the size of W is reduced by removing cell, and in each time check W is empty , how can I do that in matlab
W =
1×2 cell array
[1×2 double] [1×2 double]
>> W{1}
ans =
1 2
>> W{2}
ans =
2 3

Best Answer

If you want to check that a cell array is empty, simply use isempty(W), which will yield 0 as long as you still have values left in W, and 1 once the final cell is removed.