Graphics Reference
In-Depth Information
Then build the matrix H , formed by the intersection of the first and third rows of C and its second, third and
fifth columns:
>> H = C([1 3],[2 3 5])
H =
7 1 0
0 0 1
Now we build an array I formed by the identity matrix of order 5 x 4 and zero matrices of the same order attached
to the right. Then we extract the first row of I and, finally, form the matrix J with the odd rows and the pairs and
columns and calculate the order (size).
>> I = [eye (5.4) zeros (5.4) ones (5.4)]
Ans =
1 0 0 0 0 0 0 0 1 1 1 1
0 1 0 0 0 0 0 0 1 1 1 1
0 0 1 0 0 0 0 0 1 1 1 1
0 0 0 1 0 0 0 0 1 1 1 1
0 0 0 0 0 0 0 0 1 1 1 1
>> I(1,:)
ans =
1 0 0 0 0 0 0 0 1 1 1 1
>> J = I (1:2:5, 2:2:12)
J =
0 0 0 0 1 1
0 0 0 0 1 1
0 0 0 0 1 1
>> size (J)
ans =
3 6
We then construct a random K matrix of order 3 x 4 and invert first in order of their rows, then by the order of
the columns and then the order of the rows and columns at once. Finally, we find the matrix L of order 4 x 3 whose
columns are taking the elements of K's columns sequentially.
>> K = rand (3,4)
K =
0.5269 0.4160 0.7622 0.7361
0.0920 0.7012 0.2625 0.3282
0.6539 0.9103 0.0475 0.6326
Search WWH ::




Custom Search