I'm tryting to store the text data into MATLAB but it has an error.
The data has 11 attributes and the last attributes represent the class of the data.
filepath = '/train.txt';
fileID = fopen(filepath);
C = textscan(fileID,'%s %s %s %s %s %s %s %s %s %s %s','Delimiter',',');
fclose(fileID);
N = size(C{1},1);
D = 11; %number of attributes
data = zeros(N,D);
label = zeros(N,1);
for n=1:N %1~214
for d=1:D %1~11
data(n,d) = C{d}{n};
end
label(n) = C{D}{n};
end
I get the error:
Subscripted assignment dimension mismatch.
Error in readdata (line 19)
data(n,d) = C{d}{n};