Sry, i forgot to delete y=length(text). I tried a different solution with matrices and needed this variable.
I deleted this one since it does not bekong to this solution with blocks but its still not working and i get the same error :(
thx btw for trying!
EDIT: I corrected my question and now its easier to read, sry
EDIT2: Ok, I still dont know why i get [1x3 chars] in the while loop but i fixed the issue with direct acces to the cell elemts. Well thats not the solution I wanted but it works when u know ur file structure. Here is the fixed code:
function [A] = ignore(Datei)
fid = fopen(Datei,'r');
text = fscanf(fid,'%c');
fclose(fid);
R = text;
k = 1;
while (~isempty(R))
[T,R] = strtok(R,{' ',';'});
B{1,k} = T
k = k + 1;
end
A = struct(B{1},B{2},B{3}(1,3),B{4},B{5}(1,3),B{6});
save ignore A