TUGAS 2 Anum
TUGAS 2 Anum
>> 25 + 40 / 34 - 17
ans =
9.1765
>> 56+72-16/4*8+50
ans =
146
>> 34/6+186-57*12
ans =
-492.3333
>> 27^4*15+120-48
ans =
7971687
>> sqrt(65536)+35-124/12
ans =
280.6667
>> sqrt(175+256*12/8)
ans =
23.6432
>> sqrt(105+23-58*25-100/8)
ans =
0.0000 +36.5308i
>> ans+34/6+186-57*15
ans =
-6.6333e+02 + 3.6531e+01i
>> cos(pi/3)
ans =
0.5000
>> sin(pi/2)+cos(pi/3)
MATLAB Command Window Page 2
ans =
1.5000
>> tan(pi*4)+cos(pi*3)
ans =
-1.0000
>> sin(pi/4)+tan(pi/2)-cos(pi/2)
ans =
1.6331e+16
>> A=[6 9 7 8 11 9
12 9 8 4 10 7
6 14 9 6 9 6
8 4 7 9 11 5
4 12 9 6 8 10]
A =
6 9 7 8 11 9
12 9 8 4 10 7
6 14 9 6 9 6
8 4 7 9 11 5
4 12 9 6 8 10
>> A(4,5)
ans =
11
>> A(2,3)
ans =
>> A(3,:)
ans =
6 14 9 6 9 6
>> A(:,4)
ans =
8
4
MATLAB Command Window Page 3
6
9
6
>> E=zeros(9,7)
E =
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
>> E=ones(10,6)
E =
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
>> t=12:4:256
t =
Columns 1 through 15
12 16 20 24 28 32 36 40 44 48 52 56 60 64
68
Columns 16 through 30
Columns 31 through 45
132 136 140 144 148 152 156 160 164 168 172 176 180 184
188
Columns 46 through 60
192 196 200 204 208 212 216 220 224 228 232 236 240 244
MATLAB Command Window Page 4
248
Columns 61 through 62
252 256
>> t=115:1,5:5
t =
ans =
ans =
Columns 1 through 9
Columns 10 through 11
6.6000 7.0000
ans =
Columns 1 through 9
Columns 10 through 12
>>