Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

• >> B = [60:0.

5:70]
B=

• >> V = [3 3 3; 4 4 4; 5 5 5];
>> G = [3 5 6; 3 8 9; 9 5 4];
>> Y = V*G
Y=

• >> V(:,:)
Ans=

• >> V(:,2)
Ans=

• >> V(:,3) '


Ans=

• >> H=[2 3 4 6; 5 4 3 5; 6 7 8 3; 8 7 4 8]
H=

• >>H(2:3,3:4) '
H=
• >>X=[2 2 2; 3 3 3; 4 4 4];
>>T=H(1:3,1:3)+X
T=

• >> T=H(1:3,1:3)-X
T=

• >> K=eye(3)
K=

• >> T=[1 ones(1,5) zeros(1,3)]


T=

• >> T=rand(3)
T=

• >> S=magic(4)
S=

• >> R=eig(eye(4))
R=
• >> U=round([-1.2 -2.5 -3.5 1.2 3.5 3.9 4.6])
U=

• >> X=abs(U)
X=

• >> U=floor([-1.2 -2.5 -3.5 1.2 3.5 3.9 4.6])


U=

• >> U=ceil([-1.2 -2.5 -3.5 1.2 3.5 3.9 4.6])


U=

• Let two matrices of 3 x 3 name A and B and verify that:


a. A^2 = A * A
b. A ./ B = B .\ A

Note: A and B Matrices consist of real integers.


• Generate the following matrix (see Figure-0.3) show the output and determine its

• Size
• Determinant
• Inverse
• Length
• Diagonal
• Eigen Value
• Sin
• Sin-1
• Cos
• Cos-1
• Tan
• Tan-1
• Square Root
• Natural Log (Ln)
• Logarithm

A=

Figure-0.3
• Find the values of x, y, and z in the following equations?
3x + 2y + 4 z = 4
5x + 4y + 6 z = 6
3x + 5y + 7 z = 8

Hint: X = A\B
Denotes the solution to the matrix equation AX = B.

You might also like