From my past experience, MATLAB does not like strings and numbers to be in the same matrix, so you would be forced to use a cell.
You can do this relatively easily with some simple paring.
fid = fopen('temp.txt','r'); %# open file for reading
count = 1;
content = {};
while ~feof(fid)
line = strtrim(fgets(fid)); %# read line by line
parts = regexp(line,';','split');
for i = 1:numel(parts)
temp = regexp(parts{i},'-?[0-9]*\.?[0-9]*(i|j)?','match');
if numel(temp) >= 1 && strcmpi(temp{1},parts{i})
parts{i} = str2double(parts{i}) ;
end
end
content{count} = parts;
count = count + 1;
end
fclose(fid);
numRows = size(content,2)-1;
whole = cell(numRows,8);
for i = 1:numRows
for j = 1:8
whole{i,j} = content{i+1}{j};
end
end
content = {content{1},whole};
UPDATE
I added some stuff to put everything into a single cell array, all of the data outside of the header. I do not know if you wand the header to also be in that 8 column array, but if you do here is some code to do that
numRows = size(content,2);
whole = cell(numRows,8);
for i = 1:numRows
for j = 1:min([size(content{i},2),8])
whole{i,j} = content{i}{j};
end
end
whole