You are on page 1of 3

>> pwd

>>A= { 2 1 12 ; 1 7 8 ; -1 3 9 ; 7 10 13}
Ans = .

..
>>A= (2, :)
>>A= (:,3)
EXTRACTING 3RD ROW
>>A({2},={}
= TO DELETE SECOND ROW OF MATRIX
>> A (3,2)
10
ROW 3 AND COLUMN 2
>> B={8 ;10; 25}
B=
8 10 25
>> C = [A B]
C=
ANSWER
COMBINING MATRIX
>> D TRY
>> X = [ 2 5 1 6 ] ( PUT SEMICOLON TO MAKE IT COLUMN MATRIX)
X= ANS
>> 16. + X
ANS= A A A A
ADDING 16 TO EACH ELEMENT
>>3. +X(2)
ans
>>3. +X(3)
ans
>> x .*2
Ans =

ADDINg 3 TO odd index


>>sqrt (x)
Ans=
Squaring each elements
>>X[aaaaa]
ans
>>Y[aaaa] make it column matrix
Ans
>> x= x+y
>>Y=y/x
Y=
Ans
>> z = x. * y
e.
>>w = z+z
>>x.*y w
Ans
b. try
4.a
>> A= {1 4 2 ; .}
Ans=
4.b
Paste the command
Ans
Explain output:
Explaining the way u got the answer
5.a
>> A= [ 2 3 4 5 1 7]
>> sum (A)
>> SIN (A}

Adding ..refer the question

6.A
>> A= { 1 2 20 }
Ans=
A=A.^2
>> SUM (A)
=2870
>> TRY
7.
>>tet.m = naming files
>>pwd
They will whre the file is located
8. >> oct.m
Recall the file
8.a
Cpy text provide in exercises
8
>> function [a] =sum (a , b )

You might also like