Graphics Reference
In-Depth Information
exercise A-9
Given a uniform random square matrix m of order 3, obtain its inverse and its transposed diagonal. transform it
to a lower triangular matrix and an upper triangular matrix and rotate it 90 degrees. Get the sum of the elements
in the first row and the sum of the diagonal elements. extract the subarray whose diagonal elements are the
elements a 11 and a 22 and also remove the subarray whose diagonal elements are a 11 and a 33 .
>> M=rand(3)
M =
0.6868 0.8462 0.6539
0.5890 0.5269 0.4160
0.9304 0.0920 0.7012
>> A=inv(M)
A =
-4.1588 6.6947 -0.0934
0.3255 1.5930 -1.2487
5.4758 -9.0924 1.7138
>> B=M'
B =
0.6868 0.5890 0.9304
0.8462 0.5269 0.0920
0.6539 0.4160 0.7012
>> V=diag(M)
V =
0.6868
0.5269
0.7012
>> TI=tril(M)
TI =
0.6868 0 0
0.5890 0.5269 0
0.9304 0.0920 0.7012
Search WWH ::




Custom Search