I am trying to read file text.txt that looks like this
F1:3B
F2:22
F3:34
and save it in a matrix M, where M(1)=F1:3B etc
Best Answer
fid = fopen('text.txt','rt');
M = textscan(fid,'%s');
fclose(fid)
M = M{1};
ThenM will contain a column vectorcell array with those strings in it. You can access the strings usingcell array indexing, e.g. the second row/string:
Best Answer