For example, I have a matrix H:
H = [1 2 3; 4 5 6; 7 8 9];
I want to do a file (attached) like:
AB CDEFG 1 2 3
AB CDEFG 4 5 6
AB CDEFG 7 8 9
I wrote this:
fileID = fopen('output.txt','w');fprintf(fileID,'%2s %5s %1.0f %1.0f %1.0f\r\n','AB','CDEFG',H);fclose(fileID);
But it doens't work. How can I do this?
Thank you in advance!
Best Answer