How can I load a big table in Matlab using textscan
13 views (last 30 days)
I am trying to load a csv file on matlab using textscan. C is a 1x4 cell array with each element being a 36x1 cell. I try to get the table by using the cell2table function but returns a 1x4 table. I need a 36x4 table but I am not sure why the cell doesnt load as a 36X4 cell in the first place.
f = fopen('test.csv');
formataux = '%s%f%f%s';
C =textscan(f, formataux,'Headerlines', 1, 'Delimiter', ',', 'EmptyValue', NaN,'CollectOutput',1); % collect all out put. no need to use struct as I dont have to manipulate each column
data = cell2table(C);