CODES / common / disp_matrix
Display matrix with labels
Contents
Syntax
- CODES.common.disp_matrix(A) displays A.
- CODES.common.disp_matrix(A,xlab) displays A with x labels xlab on the left.
- CODES.common.disp_matrix(A,xlab,ylab) displays A with x labels xlab on the left and y labels ylab on the top. If no x labels, set xlab=[].
- CODES.common.disp_matrix(...,offset) offset the displayed matrix by |offset spaces to the right.
Usage
xlab must be empty ([]) or a cell array such that length(xlab)=size(A,1). ylab must be empty ([]) or a cell array such that length(ylab)=size(A,2).
Example
Display magic matrix:
CODES.common.disp_matrix(magic(3),{'X1','X2','X3'},{'Y1','Y2','Y3'})
Y1 Y2 Y3 X1 8 1 6 X2 3 5 7 X3 4 9 2
See also
Copyright © 2015 Computational Optimal Design of Engineering Systems (CODES) Laboratory. University of Arizona.
Computational Optimal Design of Engineering Systems |