필터 지우기
필터 지우기

print out a matrix with a large size

조회 수: 3 (최근 30일)
kingsley
kingsley 2018년 2월 7일
댓글: kingsley 2018년 2월 8일
I have a matrix with a large size. How can I print it out as the form showed in the picture.
  댓글 수: 2
dpb
dpb 2018년 2월 7일
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.
kingsley
kingsley 2018년 2월 8일
ok! got it , thanks

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by