print out a matrix with a large size
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a matrix with a large size. How can I print it out as the form showed in the picture.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170032/image.jpeg)
2 Kommentare
dpb
am 7 Feb. 2018
Just as F format with specific precision or including the graphics/typesetting?
The former is simple (well as simple as anything ever gets with the stupid C-language formatting string that doesn't allow for repeat counts, anyway)...
fmt=[repmat('%10.6f',1,size(TX,2)-1) '%10.6f\n'];
fprintf(fid,fmt,TX.')
Have to fopen the file to have valid file handle, FID, first, of course, the fclose and NB: the transpose operator to output values by row; internal ML storage is column-major so would show up as the transpose in output if don't.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!