matlab transpose of a matrix code example Example: transpose array matlab B = A.' % or alternatively B = transpose(A)