Professional Documents
Culture Documents
A=
5 7 9
2 4 8
5 3 1
10 8 2
B=
10
6
2
8
>> C = [3 4; 9 2; 2 6; 7 7]
C=
3 4
9 2
2 6
7 7
>> A.^B
Error using .^
Matrix dimensions must agree.
>> B.^3
ans =
1000
216
8
512
>> C.^3
ans =
27 64
729 8
8 216
343 343
MATLAB Command Window Page 2
May 30, 2020 10:19:08 AM
>> A/pi
ans =
>> A*C
Error using *
Inner matrix dimensions must agree.
>> B*C
Error using *
Inner matrix dimensions must agree.
>> det(A)
Error using det
Matrix must be square.
>> inv(A)
Error using inv
Matrix must be square.
>> x = [0:20:270]
x=
>> z = cos(x)
z=
Columns 1 through 10
1.0000 0.4081 -0.6669 -0.9524 -0.1104 0.8623 0.8142 -0.1978 -0.9756 -0.5985
MATLAB Command Window Page 3
May 30, 2020 10:19:08 AM
Columns 11 through 14
>> length(z)
ans =
14
>> g=9.81;m=68.1;cd=0.25;
>> v=sqrt (g*m/cd)*tanh(sqrt(g*cd/m)*z)
v=
Columns 1 through 10
9.6939 3.9953 -6.5079 -9.2427 -1.0827 8.3846 7.9242 -1.9396 -9.4630 -5.8458
Columns 11 through 14
rataan_temperatur =
rataan_temperatur_hari_kedua =
27.4800
rataan_temperatur_hari_kedua =
29.9500
rataan_temperatur_jam_10 =
29.1333
rataan_temperatur_jam_10 =
26.9333
rataan_temperatur_jam_11 =
26.7000
rataan_temperatur_jam_12 =
27.2333