English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

MATLAB Vector Transpose

The transpose operation changes a column vector to a row vector and vice versa. The transpose operation is represented by a single quote (').

Online Example

Create a script file using the following code-

r = [ 1 2 3 4 ];
tr = r';
v = [1;2;3;4];
tv = v';
disp(tr); disp(tv);
When running the file, it displays the following result-
   1
   2
   3
   4
   1     2     3     4