MATLAB: How to delete entire row when both cell in column B and C is empty

delete rowempty cell

I have a table of 1084×9, but i'm only interested in the first 3 columns.
I want to delete the entire row if both column 2 and 3 are empty.
Currently i am using:
Array = readtable(file);
Arrayempty = cellfun('isempty',Array);
Array(any(Arrayempty(:,[1,2,3]),2),:)=[];
However, it deletes the row if any cell in column 2 and 3 are empty.
Eg:
'a' '' ''
'b' 'b' ''
'c' '' 'c'
'a' 'a' 'a'
'b' '' ''
'c' 'c' 'c'
Results:
'b' 'b' ''
'c' '' 'c'
'a' 'a' 'a'
'c' 'c' 'c'
Please advise, thanks.

Best Answer

Change any() to all()
Array(all(Arrayempty(:,[1,2,3]),2),:)=[];