Graphics Reference
In-Depth Information
We now construct a matrix C , formed by the matrix B and the matrix identity of order 3 attached to its right:
>> C = [B eye (3)]
C =
1 7 1 0 0
3 9 0 1 0
5 0 0 0 1
We are going to build a matrix D extracting odd columns of the matrix C , a parent and formed by the intersection
of the first two rows of C and its third and fifth columns, and a matrix F formed by the intersection of the first two rows
and the last three columns of the matrix C :
>> D = C(:,1:2:5)
D =
1 1 0
3 0 0
5-0-1
>> E = C([1 2],[3 5])
E =
1 0
0 0
>> F = C([1 2],3:5)
F =
1 0 0
0 1 0
Now we build the diagonal matrix G such that the elements of the main diagonal are the same as those of the
main diagonal of D :
>> G = diag (diag (D))
G =
1 0 0
0 0 0
0 0 1
Search WWH ::




Custom Search