Example 4 — Specify Value to Fill Empty Cells
For files with empty cells, use the emptyvalue parameter. Suppose the file data.csv contains:
1,2,3,4,,6
7,8,9,,11,12
Read the file using NaN to fill any empty cells:
data = textread('data.csv', '', 'delimiter', ',', ...
'emptyvalue', NaN);