Graphics Programs Reference
In-Depth Information
>>a+b
ans =
11
33
44
66
77
99
3.8 Transpose
To convert rows into columns use the transpose symbol
'
:
>> a'
ans =
1
4
7
3
6
9
>> b = [[1 2 3]' [4 5 6]']
b=
1
4
2
5
3
6
Becarefulwhentakingthetransposeofcomplexmatrices. Thetranspose
operator takes the complex conjugate transpose. If
z
is the matrix:
1
i
0+2
i
1+
i
0
−
then
z'
is:
1
.
0
−
2
i
0+
i
1
−
i
To take the transpose without conjugating the complex elements, use
the
.'
operator. In this case
z.'
is:
1
.
0+2
i
0
−
i
1+
i
4 Basic Graphics
The bread-and-butter of matlab graphics is the
plot
command. Earlier
we produced a plot of the sine function:
x = 0:.1:2*pi;
y = sin(x);
plot(x,y)