So if loop one gave me 't' loop two outputs 'a' and loop three output 'p', I want the final string to be 'tap'
I have attached my code below. letter is the output that gives me the letter at the index I want, so I want to make a string of all the letters
fh = fopen(txt,'r');line = fgetl(fh);while ischar(line) [row,rest] = strtok(line,'-') rest = rest(2:end) row = str2num(row) [col,rest] = strtok(rest,'-') rest = rest(2:end) col = str2num(col) [spot,~] = strtok(rest,'-') spot = str2num(spot) pos = dec(row,col) pos = char(pos) letter = pos(spot) line = fgetl(fh);end
Best Answer