MATLAB: Slash / after text .txt

arrayfprintfMATLABtxt

% open your file for writing
fid = fopen('test.txt','wt');
fprintf(fid,'super\n')
% write the matrix
myData = randi(255,10,3);
if fid > 0
fprintf(fid,'%d %d %d\n',myData');
fclose(fid);
end
This script creates a .txt file of the following format: super, then 10×3 array
The question: how to add "/" after(down) the array? Thank you!

Best Answer

Just print it before closing the file.
% open your file for writing
fid = fopen('test.txt','wt');
fprintf(fid,'super\n');
% write the matrix
myData = randi(255,10,3);
if fid > 0
fprintf(fid,'%d %d %d\n',myData');
end
fprintf(fid,'/');
fclose(fid);