Hi, I would like to write a word in the following of an existing string in text file, but with my code it deletes the whole and write the new word.
fid = fopen('File.text','w'); fprintf(fid,'%s', NewWord);
I just need to find end of line, and add the new word with only one space to the rest. Should I use textscan or?
Best Answer