4.4) Creating Vectors And Matrices: Transpose
- We can also make a row vector using the comma
- We can make a column vector using the semi-colon
- The transpose command ' (apostrophe) placed after the closing bracket or following a vector or array variable name, switches the dimensions. For example:
[matlab]
>> a=[13,26,38]
a= 13 26 38
[/matlab]
Which is a 1x3 row vector
[matlab]
>> b=[13;26;38]
b= 13
26
38
[/matlab]
[matlab]
>> b'=
ans= 13 26 38
>> c=[13;26;38]'
c= 13 26 38
[/matlab]