You are on page 1of 48

TUGAS KOMPUTASI PROSES

Disusun Oleh:

1. Mala Sari Kesuma 170405004


2. M. Syahripin Pulungan 170405011
3. Megaria Lubis 170405026
4. M. Alfi Hendry 170405027
5. Marvino Brayn Tarigan 170405030
6. Natasya Arihta Br Sitepu 170405048

Dosen Pengajar: Ir. Bambang Trisakti, MT

PROGRAM STUDI TEKNIK KIMIA


FAKULTAS TEKNIK
UNIVERSITAS SUMATERA UTARA
MEDAN
2019
TUGAS 1

3x1  2 x2  x3  3
1. 2 x1  4 x2  2 x3  2
4 x1  2 x2  3x3  12

 Penyelesaian MATLAB:
% k01cth03.m
% Contoh Sistem Persamaan Linear
% Ax=b
% x=A\b
clear; clc
A=[3 -2 1; 2 4 -2; 4 -2 -3]
b=[3; 2; -12]
x=A\b
det(A)

 Hasil MATLAB
A= b= x=
3 -2 1 3 1
2 4 -2 2 2
4 -2 -3 -12 4

ans =
-64
2 x2  x3  3
2. 2 x1  3x2  x3  1
3x1  2 x2  5 x3  10

 Penyelesaian MATLAB
% k01cth03.m
% Contoh Sistem Persamaan Linear
% Ax=b
% x=A\b
clear; clc
A=[0 2 -1; 2 -3 1; 3 -2 5]
b=[3; 1; 10]
x=A\b
det(A)

 Hasil MATLAB
A= b= x=
0 2 -1 3 3.0000
2 -3 1 1 2.0000
3 -2 5 10 1.0000

ans =
-19
3x1  x2  3x3  2
3. 5 x1  3x2  x3  6
x1  2 x2  x3  2

 Penyelesaian MATLAB
% k01cth03.m
% Contoh Sistem Persamaan Linear
% Ax=b
% x=A\b
clear; clc
A=[3 -1 3; 5 3 1; 1 2 -1]
b=[2; 6; 2]
x=A\b
det(A)

 Hasil MATLAB
A= b= x=
3 -1 3 2 0.1429
5 3 1 6 1.4286
1 2 -1 2 1.0000

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND
=9.594520e-18.
> In A05 at 8
ans =
-3.1086e-15
2 x1  2 x 2  x3  1
4. x1  x 2  3x3  3
3x1  2 x 2  x3  1

 Penyelesaian MATLAB
% k01cth03.m
% Contoh Sistem Persamaan Linear
% Ax=b
% x=A\b
clear; clc
A=[2 -2 1; 1 1 -3; 3 -2 -1]
b=[1; 3; 1]
x=A\b
det(A)

 Hasil MATLAB
A= b= x=
2 -2 1 1 4.6667
1 1 -3 3 5.3333
3 -2 -1 1 2.3333

ans =
-3.0000
TUGAS 2

1. 𝑓 (𝑥) = 𝑥 3 − 6𝑥 2 − 27 = 0

 Penyelesaian menggunakan Matlab


% k03cth01.m
% Contoh Persamaan Tak Linear bentuk polinomial
% x=roots(p)
clear; clc
p=[1 -6 -0 -27];
x=roots(p)
x(1)^3-6*x(1)^2-27

 Hasil MATLAB

x=

6.6167 + 0.0000i
-0.3084 + 1.9964i
-0.3084 - 1.9964i

ans =

1.1369e-13
2. 𝑓 = 𝑥 4 − 10𝑥 3 + 35𝑥 2 − 50𝑥 + 24 = 0

 Penyelesaian menggunakan Matlab


% k03cth01.m
% Contoh Persamaan Tak Linear bentuk polinomial
% x=roots(p)
clear; clc
p=[1 -10 35 -50 24];
x=roots(p)
x(1)^4-10*x(1)^3+35*x(1)^2-50*x(1)+24

 Hasil MATLAB
x=
4.0000
3.0000
2.0000
1.0000

ans =
-1.4211e-13
3. 𝑓 = 𝑥 4 + 35𝑥 2 − 50𝑥 + 24 = 0

 Penyelesaian menggunakan Matlab


% k03cth01.m
% Contoh Persamaan Tak Linear bentuk polinomial
% x=roots(p)
clear; clc
p=[1 0 35 -50 24];
x=roots(p)
x(1)^4+35*x(1)^2-50*x(1)+24

 Hasil MATLAB
x=
-0.7014 + 5.9845i
-0.7014 - 5.9845i
0.7014 + 0.4113i
0.7014 - 0.4113i

ans =
2.2737e-13
4. f ( x)  x 4  10 x3  50 x  24  0

 Penyelesaian menggunakan Matlab


% k03cth01.m
% Contoh Persamaan Tak Linear bentuk polinomial
% x=roots(p)
clear; clc
p=[1 -10 0 -50 24];
x=roots(p)
x(1)^4-10*x(1)^3-50*x(1)+24

 Hasil MATLAB
x=
10.4378 + 0.0000i
-0.4496 + 2.1869i
-0.4496 - 2.1869i
0.4613 + 0.0000i

ans =
1.2051e-11
5. f ( x)  x 3  9 x 2  26 x  24  0

 Penyelesaian menggunakan Matlab


% k03cth01.m
% Contoh Persamaan Tak Linear bentuk polinomial
% x=roots(p)
clear; clc
p=[1 -9 26 -24];
x=roots(p)
x(1)^3-9*x(1)^2+26*x(1)-24

 Hasil MATLAB
x=
4.0000
3.0000
2.0000

ans =
5.6843e-14
6. f ( x)  x 5  20 x 4  155x 3  580 x 2  1044 x  720  0

 Penyelesaian menggunakan Matlab:


% k03cth01.m
% Contoh Persamaan Tak Linear bentuk polinomial
% x=roots(p)
clear; clc
p=[1 -20 155 -580 1044 -720];
x=roots(p)
x(1)^5-20*x(1)^4+155*x(1)^3-580*x(1)^2+1044*x(1)-720

 Hasil MATLAB
x=
6.0000
5.0000
4.0000
3.0000
2.0000

ans =
-5.4570e-12
TUGAS 3

1. f ( )  53 cos(40)  52 cos( )  116  cos(40   )  0

 Penyelesain menggunakan MATLAB


% k03cth03.m
% Contoh Persamaan Tak Linear bentuk polinomial
% x=fzero(f,x0)
clear; clc
f=@(x) (5/3)*cos(40)-(5/2)*cos(x)+(11/6)-cos(40-x)
x0=1;
x=fzero(f,x0)

 Hasil MATLAB

@(x)(5/3)*cos(40)-(5/2)*cos(x)+(11/6)-cos(40-x)

x=

1.5835
2. f ( x)  x  cos( x)  0

 Penyelesaian menggunakan MATLAB


% k03cth03.m
% Contoh Persamaan Tak Linear bentuk polinomial
% x=fzero(f,x0)
clear; clc
f=@(x) x-cos(x)
x0=1;
x=fzero(f,x0)

 Hasil MATLAB
@(x)x-cos(x)

x=
0.7391
3. f ( x)  e x  2 x  2  0

 Penyelesaian menggunakan MATLAB


% k03cth03.m
% Contoh Persamaan Tak Linear bentuk polinomial
% x=fzero(f,x0)
clear; clc
f=@(x)exp(x)-2*x-2
x0=1;
x=fzero(f,x0)

 Hasil MATLAB
@(x)exp(x)-2*x-2
x=
1.6783
TUGAS 4

1. 2 x 2  3x 2  50  0
1 2

2 x12  x2  9  0

 Penyelesaian menggunakan MATLAB


% k04cth01.m
% Contoh Sistem Persamaan Tak Linear
% x = fsolve(Fx,x0)
clear: clc
F = @(x)[2*x(1)^2 +3*x(2)^2 - 50; 2*x(1) ^2- x(2) - 9];
x0 = [1 1];
options = optimset('Display', 'iter');
[x,fval] = fsolve(f,x0,options)

 Hasil MATLAB
>> A01
Iteration Func-count f(x) Norm of step First-order Trust-region
optimality radius
0 3 37217.1 2e+04 1
1 6 7835.54 1 4.46e+03 1
2 9 1448.31 1 917 1
3 12 201.339 1 158 1
4 15 17.2596 0.898587 21.8 1
5 18 0.843346 0.559583 2.82 2.25
6 21 0.00910338 0.211377 0.234 2.25
7 24 2.12075e-06 0.0275459 0.00346 2.25
8 27 1.26899e-13 0.000433631 8.46e-07 2.25
Equation solved.

fsolve completed because the vector of function values is near zero as measured by the default
value of the function tolerance, and the problem appears regular as measured by the gradient
x=

1.6783 1.6783

fval =

1.0e-06 *

0.2519 0.2519

2. 5( x2  x12 ) 4  0
(1  x1 ) 2  0

 Penyelesaian menggunakan MATLAB


% k04cth01.m
% Contoh Sistem Persamaan Tak Linear
% x = fsolve(Fx,x0)
clear: clc
f = @(x)[5*(x(2)+x(1)^2)^4 ; (1-x(1)) ^2];
x0 = [1 1];
options = optimset('Display', 'iter');
[x,fval] = fsolve(f,x0,options)
 Hasil MATLAB
>> A02

Iteration Func-count f(x) Norm of step First-order Trust-region


optimality radius
0 3 6400 2.56e+04 1
1 6 640.723 0.5 3.42e+03 1
2 9 64.1446 0.375 456 1
3 12 6.4217 0.28125 60.9 1
4 15 0.703137 0.0943341 8.05 1
5 18 0.0725066 0.240961 1.15 1
6 21 0.00733055 0.162217 0.159 1
7 24 0.000736286 0.111584 0.0215 1
8 27 7.37918e-05 0.0784674 0.00288 1
9 30 7.39017e-06 0.0562052 0.000386 1
10 33 7.3994e-07 0.0408261 5.16e-05 1
11 36 7.40804e-08 0.0299556 6.89e-06 1
12 39 7.41649e-09 0.0221351 9.21e-07 1

Equation solved.
fsolve completed because the vector of function values is near zero as measured by the default
value of the function tolerance, and the problem appears regular as measured by the gradient.
x=
0.9997 -0.9349

fval =
1.0e-04 *
0.8612
0.0011
3. 𝑥13 + 𝑒 𝑥2 + sinh(𝑥3 ) = 3.62882
𝑥12 𝑥3 + (𝑥22 − 𝑥3 )4 =4.0
𝑥1 𝑥2 𝑥3 − 𝑥3 + 𝑥1 𝑥2 = 5.0

 Penyelesaian dengan Matlab:


clc;
%F = @(x)[x(1)^ + exp(x(2)) - sinh(x(3))- 3.62882 ; x(1)*x(3) + (x(2)^2-%x(3))^4 - 4 ;
x(1)*x(2)*x(3)- x(3) + x(1)*x(2)-5];
%x0 = [-5 -5 -5];
options = optimset('Display', 'iter');

[x,fval] = fsolve(F,x0,options)

 Hasil MATLAB:

Iteration Func-count f(x) Norm of step First-order Trust-region


optimality radius
0 4 6.56134e+11 2.56e+04 1
1 8 7.90048e+10 1 1.17e+11 1
2 12 9.52872e+09 1 1.57e+10 1
3 16 1.14853e+09 1 2.09e+09 1
4 20 1.37674e+08 1 2.75e+08 1
5 24 1.62859e+07 1 3.58e+07 1
6 28 1.89149e+06 1 4.62e+06 1
7 32 219598 1 5.92e+05 1
8 36 24881.3 1 7.53e+04 1
9 40 2791.99 1 9.65e+03 1
10 44 265,831 1 1.23e+03 1
11 48 17.6597 2.5 152 2.5
12 49 17.6597 6.25 152 6.25
13 52 9.17011 1.5625 31.2 1.56
14 54 9.17011 3.90625 31.2 3.91
15 58 7.91407 0.976563 14.6 0.977
16 62 5.28283 2.44141 32.1 2.44
17 63 5.28283 6.10352 32.1 6.1
18 67 2.81984 1.52588 12.8 1.53
19 71 1.28061 3.8147 65.3 3.81
20 75 0.0296271 2.19036 6.22 5.48
21 79 1.37948e-05 0.329589 0.21 5.48
22 83 1.14624e-12 0.00385383 4.56e-05 5.48
23 87 1.54699e-26 1.50989e-06 6.63e-12 5.48

x=

0.9879 +10.3475i -1.0202 - 0.3653i -0.9420 + 0.3570i

fval =
1.0e-13 *
0.1288 - 0.0389i
-0.7194 - 0.8527i
-0.0178 + 0.5329i
Tugas 5

1. Tentukan nilai f(3.44) dari data berikut:


X f(x)
3.35 0.298507
3.40 0.294118
3.50 0.285714
3.60 0.277778

 Penyelesaian dengan Matlab:

clear; clc
t = [3.35 3.40 3.50 3.60];
p = [0.298507 0.294118 0.285714 0.277778];

%tentukan nilai f(3.44)


pi=interp1(t,p,3.44) % linear pi= 0.2908
ps=spline(t,p,3.44) % kubik ps= 0.2907

x = 3.35:1:3.60;
y = interp1(t,p,x); %
plot(t,p,'o-',x,y,3.34,pi,'x-');
xlabel ('x'), ylabel ('f(x)');
title('f(x) vs x');
Grafik 1. f(x) vs x

2. Estimasi entalpi steam jenuh pada suhu 252℉ dari tabel berikut:
Suhu (℉) Entalpi steam jenuh
(btu/lb)
220 1153.4
240 1160.6
260 1167.4
280 1173.8

 Penyelesaian dengan Matlab:


clear; clc

t = 220:20:280;
p = [1153.4 1160.6 1167.4 1173.8];

%tentukan entalpi steam jenuh pada 252F


pi=interp1(t,p,252) % linear pi = 1.1647e+03
ps=spline(t,p,252) % kubik ps = 1.1647e+03

x = 220:1:280;
y = interp1(t,p,x); %
plot(t,p,'o',x,y,252,pi, 'x')
xlabel ('Suhu (F)'), ylabel ('Entalpi Steam Jenuh (Btu/lb)');
title('Entalpi Steam Jenuh (Btu/lb) vs Suhu (F)');

Grafik 2. Entalpi Steam Jenuh (Btu/lb) vs Suhu (℉)


3. Estimasi komposisi uap yang berkesetimbangan dengan cairan yang mengandung 5%
mol etanol dan 95% mol air pada tekanan 1 atm. Gunakan data sebagai berikut:
Fraksi mol etanol Fraksi mol etanol
pada fasa cair pada fasa uap
0.0000 0.0000
0.0190 0.1700
0.0721 0.3891
0.0966 0.4375
0.1238 0.4704
0.1661 0.5089
0.2337 0.5445
0.2606 0.5580
Penyelesaian:

clear; clc

t = [0.0000 0.0190 0.0721 0.0966 0.1238 0.1661 0.2337 0.2608];


p = [0.0000 0.1700 0.3891 0.4375 0.4704 0.5089 0.5445 0.5580];

%tentukan komposisi uap yang berkesetimbangan dengan cairan yang mengandung


5% mol etanol dan 95% mol air
pi=interp1(t,p,0.05) % linear pi = 0.2979
ps=spline(t,p,0.05) % kubik ps = 0.3283

x = 0.0000:1:0.2608;
y = interp1(t,p,x); %
plot(t,p,'o-',x,y,0.05,pi, 'x-')
xlabel ('Fraksi Etanol(l)'), ylabel ('Fraksi Etanol(g)');
title('Fraksi Etanol(g) vs Fraksi Etanol(l)');
Grafik 3. Fraksi Etanol(g) vs Fraksi Etanol(l)

4. Estimasi konstanta laju pada suhu 316 K dari data berikut:


Suhu Konstanta laju
(K) (dtk-1)
280 1.563
290 2.905
300 5.181
310 8.901
320 14.780
330 23.810

Penyelesaian dengan Matlab:

clear; clc
t = 280:10:330;
p = [1.563 2.905 5.181 8.901 14.780 23.810];

%tentukan konstanta laju pada suhu 316 K


pi=interp1(t,p,316) % linear pi = 12.4284
ps=spline(t,p,316) % kubik ps = 12.1092

x = 280:1:330;
y = interp1(t,p,x); %
plot(t,p,'o-',x,y,316,pi, 'x-')
xlabel ('Suhu (K)'), ylabel ('Konstanta Laju (dtk-1)');
title('Konstanta Laju (dtk-1) vs Suhu (K)');
Grafik Konstanta Laju (dtk-1) vs Suhu (K)
Tugas 6

3.9
1
1.  x dx
3.1

 Penyelesaian matlab :
 F = @(x)1./x;
 Qs = quad(F,3.1,3.9)

 Hasil MATLAB:
 Qs = 0.2296
5

 (3x  2)dx
2
2.
0

 Penyelesaian Matlab :
 F= @(x)(3*x.^2+2);
 Qs= quad(F,0,5)

 Hasil MATLAB:

 Qs = 135
1.0

 e dx
x
3.
0.1

 Penyelesaian Matlab :

 F= @(x)exp(x);
 Qs= quad (F,0.1,1.0)

 Hasil MATLAB:

 Qs = 1.6131
2 .5
4.
 ln xdx
1.5

 Penyelesaian Matlab :

 F= @(x)log(x)
 Qs= quad (F,1.5,2.5)

 Hasil MATLAB:

 Qs = 0.6825

1.2
5.
 tan xdx
0.2

 Penyelesaian Matlab :

 F= @(x)tan (x)
 Qs= quad (F,0.2,1.2)

 Hasil MATLAB:

 Qs = 0.9950
Tugas 7

dy
ey  x 2 y 2  2 sin( 3x), y (0)  5
1. dx

 Penyelesaian dengan MATLAB:

%clc;
%xs = [0 10];
%y0=5;
%F=@(x,y)((2*sin(3*x)-x^2*y^2)*exp(-y))
[X,Y] = ode45(F,xs,y0)
plot(X,Y,'-o') %(:,1)

 Hasil MATLAB:

F=

@(x,y)((2*sin(3*x)-x^2*y^2)*exp(-y))

X=

0
0.1500
0.3000
0.4500
0.6000
0.7500
0.9000
1.0500
1.2000
1.3500
1.5000
1.6500
1.8000
1.9500
2.1000
2.2500
2.4000
2.5500
2.7000
2.8500
3.0000
3.0825
3.1651
3.2476
3.3301
3.3574
3.3847
3.4119
3.4392
3.4664
3.4937
3.5210
3.5482
3.5791
3.6100
3.6409
3.6717
3.6877
3.7037
3.7197
3.7357
3.7464
3.7571
3.7678
3.7785
3.7819
3.7853
3.7887
3.7921
3.7955
3.7989
3.8023
3.8056
3.8062
3.8067
3.8072
3.8077
3.8082
3.8087
3.8092
3.8097
3.8111
3.8124
3.8138
3.8151
3.8159
3.8167
3.8175
3.8183
3.8186
3.8189
3.8192
3.8194
3.8197
3.8200
3.8203
3.8206
3.8206
3.8207
3.8207
3.8208
3.8208
3.8208
3.8209
3.8209
3.8211
3.8213
3.8215
3.8217
3.8227
3.8237
3.8247
3.8257
3.8306
3.8356
3.8405
3.8454
3.8702
3.8949
3.9196
3.9444
4.0680
4.1917
4.3153
4.4390
4.5890
4.7390
4.8890
5.0390
5.1890
5.3390
5.4890
5.6390
5.7292
5.8195
5.9097
6.0000

Y=

5.0000
5.0003
5.0002
4.9984
4.9934
4.9836
4.9673
4.9431
4.9091
4.8636
4.8049
4.7304
4.6374
4.5219
4.3791
4.2012
3.9773
3.6924
3.3180
2.8249
2.1905
1.7835
1.3756
1.0051
0.6996
0.6154
0.5381
0.4670
0.4014
0.3403
0.2829
0.2284
0.1758
0.1175
0.0594
-0.0005
-0.0649
-0.1013
-0.1409
-0.1850
-0.2360
-0.2757
-0.3215
-0.3764
-0.4457
-0.4720
-0.5010
-0.5334
-0.5701
-0.6123
-0.6615
-0.7204
-0.7934
-0.8060
-0.8191
-0.8328
-0.8471
-0.8620
-0.8777
-0.8941
-0.9113
-0.9613
-1.0193
-1.0884
-1.1735
-1.2341
-1.3051
-1.3911
-1.4993
-1.5461
-1.5983
-1.6573
-1.7250
-1.8044
-1.8985
-2.0148
-2.1667
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN

 5 y 2  sin x, y 0  2
dy
3
2. dx
 Penyelsaian dengan MATLAB:
%clc;
%xs = [0 6];
%y0=5;
%F=@(x,y)((sin(1*x)-5*y^2)/3);
[X,Y] = ode45(F,xs,y0)
plot(X,Y,'-o') %(:,1)

Hasil MATLAB:

X=

0
0.0060
0.0121
0.0181
0.0241
0.0404
0.0567
0.0730
0.0893
0.1101
0.1310
0.1518
0.1726
0.2024
0.2322
0.2620
0.2918
0.3334
0.3750
0.4166
0.4581
0.5159
0.5736
0.6313
0.6891
0.7676
0.8461
0.9246
1.0031
1.1061
1.2090
1.3119
1.4149
1.5449
1.6748
1.8048
1.9348
2.0848
2.2348
2.3848
2.5348
2.6848
2.8348
2.9848
3.1348
3.2848
3.4348
3.5848
3.7348
3.8848
4.0348
4.1848
4.3348
4.4848
4.6348
4.7848
4.9348
5.0848
5.2348
5.3848
5.5348
5.6511
5.7674
5.8837
6.0000

Y=

5.0000
4.7608
4.5435
4.3452
4.1635
3.7398
3.3954
3.1108
2.8700
2.6102
2.3941
2.2118
2.0554
1.8665
1.7102
1.5790
1.4670
1.3353
1.2267
1.1358
1.0586
0.9688
0.8954
0.8346
0.7837
0.7266
0.6808
0.6439
0.6138
0.5824
0.5581
0.5392
0.5244
0.5096
0.4980
0.4880
0.4788
0.4680
0.4561
0.4425
0.4267
0.4084
0.3874
0.3636
0.3369
0.3075
0.2754
0.2407
0.2036
0.1641
0.1225
0.0788
0.0330
-0.0147
-0.0646
-0.1166
-0.1712
-0.2291
-0.2910
-0.3587
-0.4346
-0.5019
-0.5794
-0.6719
-0.7878
Tugas 8

a) Tentukan nilai nA setelah 25 detik jika perubahan nA mengikuti persamaan sbb:

dn A  0.1n A2
 Pada t = 0  nA = 0.01
dt 0.75  25n A

 Penyelesaian dengan MATLAB:

%clc;
%ts = [0 25];
%n0=0.01;
%F=@(t,n)(0.1*n^2/(0.75-0.25*n));
[t,n] = ode45(F,ts,n0)

plot(t,n,'-o') %(:,1)

 Hasil MATLAB:

t=

0
0.6250
1.2500
1.8750
2.5000
3.1250
3.7500
4.3750
5.0000
5.6250
6.2500
6.8750
7.5000
8.1250
8.7500
9.3750
10.0000
10.6250
11.2500
11.8750
12.5000
13.1250
13.7500
14.3750
15.0000
15.6250
16.2500
16.8750
17.5000
18.1250
18.7500
19.3750
20.0000
20.6250
21.2500
21.8750
22.5000
23.1250
23.7500
24.3750
25.0000

n=

0.0100
0.0100
0.0100
0.0100
0.0100
0.0100
0.0101
0.0101
0.0101
0.0101
0.0101
0.0101
0.0101
0.0101
0.0101
0.0101
0.0101
0.0101
0.0102
0.0102
0.0102
0.0102
0.0102
0.0102
0.0102
0.0102
0.0102
0.0102
0.0102
0.0102
0.0103
0.0103
0.0103
0.0103
0.0103
0.0103
0.0103
0.0103
0.0103
0.0103
0.0103
b) Tetukan level tangki setelah 30 detik

dH 1 Pada t = 0  H = 2
 (50.0  14.0 H 4 / 7 )
dt 147

 Penyelesaian dengan MATLAB:


%clc;

%ts = [0 30];
%H0=2;
%F=@(t,H)((1/147)*(50-14*H^2));
[t,H] = ode45(F,ts,H0)
plot(t,n,'-o') %(:,1)

 Hasil MATLAB:

t=

0
0.7500
1.5000
2.2500
3.0000
3.7500
4.5000
5.2500
6.0000
6.7500
7.5000
8.2500
9.0000
9.7500
10.5000
11.2500
12.0000
12.7500
13.5000
14.2500
15.0000
15.7500
16.5000
17.2500
18.0000
18.7500
19.5000
20.2500
21.0000
21.7500
22.5000
23.2500
24.0000
24.7500
25.5000
26.2500
27.0000
27.7500
28.5000
29.2500
30.0000

H=

2.0000
1.9732
1.9530
1.9381
1.9267
1.9179
1.9112
1.9061
1.9023
1.8993
1.8971
1.8954
1.8941
1.8931
1.8923
1.8917
1.8913
1.8909
1.8907
1.8905
1.8903
1.8902
1.8901
1.8900
1.8900
1.8899
1.8899
1.8899
1.8899
1.8899
1.8899
1.8898
1.8898
1.8898
1.8898
1.8898
1.8898
1.8898
1.8898
1.8898
1.8898

You might also like