Imagine you have the following excel spreadsheet:
xlsread
will read the sheet and fill empty cells with NaN
:
A = xlsread('data.xlsx')
A =
9 2 1
3 9 8
0 NaN 7
3 4 0
Finally you just need to filter out the rows containing NaN
s:
A = A(find(~any(isnan(A),2)),:)
A =
9 2 1
3 9 8
3 4 0