MATLAB: How save diplayed data

display

hi,
i have the following code:
fid=fopen('webscopG.txt');
for j=1:100000
tline = fgetl(fid);
i=i+1;
if ~ischar(tline), break, end
disp(tline);
end
fclose(fid);
this code will display tline as array, and that what I need . But how I can save this array of tline.
thanks

Best Answer

If you are unable to modify that source, then consider the diary command, or consider executing that source within evalc() and writing out the characters you get back from evalc().
Much better would be to follow IA's suggestion of writing to a file within the loop itself. fopen(), fprintf(), eventually fclose()