F1G113078 Uas
F1G113078 Uas
F1G113078 Uas
SOAL 2
% % Ploting grafik T Vs Z
% y_observed = y;
% y_caculated = a0+a1*x;
% % plot (x,y_observed, 'go') ; hold on
% % plot (x,y_calculated, 'r') ; hold on
% title ('Grafik T Vs Z hasil pengukuran dan perhitungan')
% ylabel ('Temperatur [C] ' )
% xlabel ('Kedalaman [m] ')
% parameters a and b
fprintf('parameters a is %1.3d\n', a0)
fprintf('parameters b is %1.3d\n', a1)
parameters a is -2.781e-01
parameters b is 8.146e+00
Prediksi stress
strain stress_estimate
0.1250 0.7401
0.3750 2.7766
0.7500 5.8313
stress Vs strain
4.5
3.5
2.5
stress
1.5
0.5
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
strain
Grafik stress calculated Vs strain
4
3.5
2.5
2
stress
1.5
0.5
-0.5
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
strain
Data pengukuran
Strain Stress
0 0
0.05 0.252
0.1 0.531
0.15 0.84
0.2 1.184
0.25 1.558
0.3 1.975
0.35 2.444
0.4 2.943
0.45 3.5
0.5 4.115
Soal 4
% Independent Variabel
disp('independent variabel')
disp(y)
% Plotting data
yc=b0+b1*x1+b2*x2;
figure (1)
plot3(x1,x2,y,'s');
title('independent variabel (observed data) Vs dependent variabel')
xlabel('x1 (1/S)')
ylabel('x2 (Grigid)')
zlabel('y (observed data)')
figure(2)
plot3(x1,x2,yc,'*r');
title('independent variabel (calculated data) Vs dependent variabel')
xlabel('x1 (1/S)')
ylabel('x2 (Grigid)')
zlabel('y (calculated data)')
Persamaan Regresi Linier Berganda adalah y= -6.036+(0.592)*x1
+(0.224)*x2
independent variabel
14.4820
9.2450
14.9920
12.3200
14.3220
13.2640
11.8400
13.1940
12.1870
10.3300
9.9620
14.9660
10.6580
13.1170
12.5080
12.3420
10.9310
14.2160
9.2890
12.8310
10.3520
13.6580
13.3040
13.6010
13.8890
9.9100
13.5120
13.0890
14.5140
13.4200
no Por 1/s grd S
1 14.482 0.561167228 88.721 1.782
2 9.245 0.403551251 67.001 2.478
3 14.992 0.566251416 91.428 1.766
4 12.32 0.459981601 81.836 2.174
5 14.322 0.549450549 88.455 1.82
6 13.264 0.4952947 85.354 2.019
7 11.84 0.449438202 79.261 2.225
8 13.194 0.484966052 85.537 2.062
9 12.187 0.453720508 81.415 2.204
10 10.33 0.429553265 71.885 2.328
11 9.962 0.427350427 69.847 2.34
12 14.966 0.566251416 91.275 1.766
13 10.658 0.438596491 73.293 2.28
14 13.117 0.484966052 85.084 2.062
15 12.508 0.474833808 82.086 2.106
16 12.342 0.459981601 81.966 2.174
17 10.931 0.442869796 74.652 2.258
18 14.216 0.549450549 87.832 1.82
19 9.289 0.415973378 66.544 2.404
20 12.831 0.480307397 83.671 2.082
21 10.352 0.000429553 72.014 2,328
22 13.658 0.503271263 87.211 1.987
23 13.304 0.4952947 85.589 2.019
24 13.601 0.513874615 86.265 1.946
25 13.889 0.544365814 86.201 1.837
26 9.91 0.427350427 69.541 2.34
27 13.512 0.504795558 86.265 1.981
28 13.089 0.484966052 84.92 2.062
29 14.514 0.561167228 88.909 1.782
30 13.42 0.5 86 2
15
14
y (observed data)
13
12
11
10
9
100
90 0.8
80 0.6
0.4
70 0.2
x2 (Grigid) 60 0
x1 (1/S)
independent variabel (calculated data) Vs dependent variabel
15
14
y (calculated data)
13
12
11
10
9
100
90 0.8
80 0.6
0.4
70 0.2
x2 (Grigid) 60 0
x1 (1/S)
Problem 5
xx=[]; y=[];
d1=8; d2=7;
d3=0; d4=3;
d5=1; d6=1;
for i=1:2:11
xx=[xx i];
y1=(d1+d6)+(d2+d5)*i+(d3+d4)*i.^2;
y=[y y1];
end
yy=[xx' y'];
disp(' ==========')
disp(' x | y ')
disp(' ==========')
disp(yy)
==========
x | y
==========
1 20
3 60
5 124
7 212
9 324
11 460
>>