disptable - Display matrix with column or row labels

버전 1.1.0.0 (2.34 KB) 작성자: Joao Henriques
Displays a matrix with per-column or per-row labels.
다운로드 수: 1.9K
업데이트 날짜: 2012/2/12

라이선스 보기

Sometimes, rows or columns (or both) of a displayed matrix or vector have different meanings, and it would be nice to display them along with the matrix (instead of, say, remembering that the third row holds a given property of a set of data points). This function allows you to specify strings that are displayed for each column or row of the matrix.

Instead of specifying them using cell arrays of strings, the shorthand notation 'label 1|label 2|label 3|...' is allowed.

DISPTABLE(M, COL_STRINGS, ROW_STRINGS)
Displays matrix or vector M with per-column or per-row labels, specified in COL_STRINGS and ROW_STRINGS, respectively. These can be cell arrays of strings, or strings delimited by the pipe character (|).
Either COL_STRINGS or ROW_STRINGS can be ommitted or empty.

DISPTABLE(M, COL_STRINGS, ROW_STRINGS, FMT, SPACES)
FMT is an optional format string or number of significant digits, as used in NUM2STR. It can also be the string 'int', as a shorthand to specify that the values should be displayed as integers.
SPACES is an optional number of spaces to separate columns, which defaults to 1.

Example:
disptable(magic(3)*10-30, 'A|B|C', 'a|b|c')
(See screenshot above.)

인용 양식

Joao Henriques (2024). disptable - Display matrix with column or row labels (https://www.mathworks.com/matlabcentral/fileexchange/27384-disptable-display-matrix-with-column-or-row-labels), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Numeric Types에 대해 자세히 알아보기
도움

줌: Lynx MATLAB Toolbox

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Corrected small bug when passing cell arrays; changed default spacing to 2 spaces.

1.0.0.0