how to transpose array in matlab code example Example: transpose array matlab B = A.' % or alternatively B = transpose(A)