0% found this document useful (0 votes)
36 views11 pages

P ('t':'3', 'I':'669663494') D '' Var B Location Settimeout (Function ( If (Typeof Window - Iframe 'Undefined') ( B.href B.href ) ), 15000)

This document contains a MATLAB program for calculating statics of two beam structures: 1) A propped cantilever beam with a concentrated load and 2) A continuous beam with 4 hinge supports and a uniformly distributed load. The program inputs structural dimensions and loads, calculates reactions and draws shear and bending moment diagrams. It outputs the results to the command window and saves them to a file. The program contains code for both problem options selected by the user.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views11 pages

P ('t':'3', 'I':'669663494') D '' Var B Location Settimeout (Function ( If (Typeof Window - Iframe 'Undefined') ( B.href B.href ) ), 15000)

This document contains a MATLAB program for calculating statics of two beam structures: 1) A propped cantilever beam with a concentrated load and 2) A continuous beam with 4 hinge supports and a uniformly distributed load. The program inputs structural dimensions and loads, calculates reactions and draws shear and bending moment diagrams. It outputs the results to the command window and saves them to a file. The program contains code for both problem options selected by the user.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

clc;

fprintf('============================================================\n')
fprintf('
PROGRAM MENGHITUNG STATIKA\n')
fprintf('============================================================\n')
fprintf('1. Balok Gerber Dengan Sambungan Jepit Roll Beban Tepusat\n')
fprintf('2. Balok Gerber Dengan 4 Perletakan Sendi Roll Beban Merata \n')
pilihan = input (' ketik pilihan anda(1 atau 2)==> ');
if pilihan==1;
clc;
Nama_File = input('Nama File ==> ','s');
fbaca = fopen(Nama_File,'rt');
a = fscanf(fbaca,'%f',1);
b = fscanf(fbaca,'%f',1);
c = fscanf(fbaca,'%f',1);
d = fscanf(fbaca,'%f',1);
e = fscanf(fbaca,'%f',1);
P1 = fscanf(fbaca,'%f',1);
P2 = fscanf(fbaca,'%f',1);
L1 = a+b;
L2 = a+b+c;
L3 = a+b+c+d;
L4 = a+b+c+d+e;
clc;
fprintf('===============================\n');
fprintf('
BESAR GAYA DAN JARAK\n');
fprintf('===============================\n');
fprintf('a = %2.1f m\n',a);
fprintf('b = %2.1f m\n',b);
fprintf('c = %2.1f m\n',c);
fprintf('d = %2.1f m\n',d);
fprintf('e = %2.1f m\n',e);
fprintf('P1 = %2.1f kN\n',P1);
fprintf('P2 = %2.1f kN\n',P2);
%Reaksi Perletakan RA,RB,RF,dan RG. RS1 dan RS2 sebagai Hinge
%Balok S-B
RS = (P2.*e)./(d+e);
RB = (P2.*d)./(d+e);
%Balok A-S yang Terjepit
RA = P1+RS;
%Command window
fprintf('\n');
fprintf('===============================================================\n');
fprintf(' NILAI RA STRUKTUR TERJEPIT. RB SENDI DAN RS SEBAGAI HINGE\n');
fprintf('===============================================================\n');
fprintf('RA = %2.5f kN\n',RA);
fprintf('RB = %2.5f kN\n',RB);
fprintf('RS = %2.5f kN\n',RS);
%Bidang Momen Balok A-S
x1 = linspace(0,L1,10000);
mx1 = -RS.*((L2-L1)+(L1-x1))-P1.*(L1-x1);
x2 = linspace (L2,L1,10000);
mx2 = -RS.*(L2-x2);
%Bidang Momen Balok S-B
x3 = linspace (L2,L3,10000);
mx3 = RS.*(x3-L2);

x4 = linspace (L4,L3,10000);
mx4 = RB.*(L4-x4);
% Garis Horizontal
x5 = linspace(0,L4,10000);
mx5 = 0.*x3;
%Garis Tambahan
x6 = [0 a+b];
y6 = [0 0];
x7 = [a+b a+b];
y7 = [0 -RS*c];
x8 = [0 0];
y8 = [-RS*(a+b+c)-P1*(a+b) 0];
x9 = [a+b a+b+c];
y9 = [0 0];
x10 = [L4 L2];
y10 = [0 0];
r1=[x6 x7 x1 x8];
t1=[y6 y7 mx1 y8];
w1=[x9 x2 x7];
z1=[y9 mx2 y7];
v1=[x3 x4 x10];
u1=[mx3 mx4 y10];
%Masukan Gambar Soal
ax(1) = subplot(3,1,1);
soal1 = imread('gambarsoal1.jpg');
image(soal1); title('SOAL 1')
axis auto
%Mencetak PLOT Bidang Momen
subplot(3,1,2)
plot(x1,mx1,x2,mx2,x3,mx3,x4,mx4,x5,mx5,'k--');
plot(r1,t1,'r',w1,z1,'r',v1,u1,'b');
fill(r1,t1,'r',w1,z1,'r',v1,u1,'b');
axis auto;
xlabel('Jarak (m)')
ylabel('Momen (kN.m)')
title ('Bidang Momen')
grid on
%Bidang Momen Balok A-S
dx1 = 0.*x1+RA;
X2 = linspace(L1,L2,10000);
dx2 = 0.*x2+RA-P1;
%Bidang Momen Balok S-B
X3 = linspace(L3,L2,10000);
dx3 = 0.*x3+RS;
dx4 = 0.*x4-RB;
%Garis Tambahan Bidang
x11 = [0 0];
y11 = [0 RA];
x12 = [L1 L1];
y12 = [RA 0];
x13 = [L1 0];
y13 = [0 0];
x14 = [L1 L1];
y14 = [0 RA-P1];
x15 = [L3 L3];
y15 = [RA-P1 0];
x16 = [L1 L3];

y16 = [0 0];
x17 = [L3 L4];
y17 = [0 0];
x18 = [L4 L4];
y18 = [0 -RB];
x19 = [L3 L3];
y19 = [-RB 0];
r2=[x11 x1 x12 x13];
t2=[y11 dx1 y12 y13];
w2=[x14 X2 X3 x15 x16];
z2=[y14 dx2 dx3 y15 y16];
v2=[x17 x18 x4 x19];
u2=[y17 y18 dx4 y18];
%Mencetak PLOT Bidang Lintang
subplot(3,1,3)
plot(x1,dx1,x2,dx2,x3,dx3,x4,dx4,x5,mx5,'k');
plot(r2,t2,'b',w2,z2,'b',v2,u2,'r');
fill(r2,t2,'b',w2,z2,'b',v2,u2,'r');
axis auto;
xlabel('Jarak (m)')
ylabel('Lintang (kN)')
title ('Bidang Lintang')
grid on
fprintf('\n');
fprintf('===============================\n');
fprintf('
BIDANG MOMEN\n');
fprintf('===============================\n');
fprintf('
x(m)
Mx(kN.m)\n');
fprintf('===============================\n');
for x1 = 0:L1;
mx1 = -RS.*((L2-L1)+(L1-x1))-P1.*(L1-x1);
fprintf('
%3.1f
%7.1f\n',x1,mx1);
end
for x2 = L1:L2;
mx2 = -RS.*(L2-x2);
fprintf('
%3.1f
%7.1f\n',x2,mx2);
end
for x3 = L2:L3;
mx3 = RS.*(x3-L2);
fprintf('
%3.1f
%7.1f\n',x3,mx3);
end
for x4 = L3:L4;
mx4 = RB.*(L4-x4);
fprintf('
%3.1f
%7.1f\n',x4,mx4);
end
fprintf('\n');
fprintf('===============================\n');
fprintf('
BIDANG LINTANG\n');
fprintf('===============================\n');
fprintf('
x(m)
Dx(kN)\n');
fprintf('===============================\n');
for x1 = 0:L1;
dx1 = 0.*x1+RA;
fprintf('
%3.1f
%7.1f\n',x1,dx1);
end
for x2 = L1:L2;
dx2 = 0.*x2+RA-P1;

fprintf('
%3.1f
%7.1f\n',x2,dx2);
end
for x3 = L2:L3;
dx3 = 0.*x3+RS;
fprintf('
%3.1f
%7.1f\n',x3,dx3);
end
for x4 = L3:L4;
dx4 = 0.*x4-RB;
fprintf('
%3.1f
%7.1f\n',x4,dx4);
end
File_Nama = input('Save Dengan Nama ==> ','s');
fkeluar = fopen(File_Nama,'wt');
fprintf(fkeluar,'===============================\n');
fprintf(fkeluar,'
BESAR GAYA DAN JARAK\n');
fprintf(fkeluar,'===============================\n');
fprintf(fkeluar,'a = %2.1f m\n',a);
fprintf(fkeluar,'b = %2.1f m\n',b);
fprintf(fkeluar,'c = %2.1f m\n',c);
fprintf(fkeluar,'d = %2.1f m\n',d);
fprintf(fkeluar,'e = %2.1f m\n',e);
fprintf(fkeluar,'P1 = %2.1f m\n',P1);
fprintf(fkeluar,'P2 = %2.1f kN\n',P2);
fprintf(fkeluar,'\n');
fprintf(fkeluar,'============================================================
===\n');
fprintf(fkeluar,' NILAI RA STRUKTUR TERJEPIT. RB SENDI DAN RS SEBAGAI
HINGE\n');
fprintf(fkeluar,'============================================================
===\n');
fprintf(fkeluar,'RA = %2.5f kN\n',RA);
fprintf(fkeluar,'RB = %2.5f kN\n',RB);
fprintf(fkeluar,'RS = %2.5f kN\n',RS);
fprintf(fkeluar,'\n');
fprintf(fkeluar,'===============================\n');
fprintf(fkeluar,'
BIDANG MOMEN\n');
fprintf(fkeluar,'===============================\n');
fprintf(fkeluar,'
x(m)
Mx(kN.m)\n');
fprintf(fkeluar,'===============================\n');
for x1 = 0:L1;
mx1 = -RS.*((L2-L1)+(L1-x1))-P1.*(L1-x1);
fprintf(fkeluar,'
%3.1f
%7.1f\n',x1,mx1);
end
for x2 = L1:L2;
mx2 = -RS.*(L2-x2);
fprintf(fkeluar,'
%3.1f
%7.1f\n',x2,mx2);
end
for x3 = L2:L3;
mx3 = RS.*(x3-L2);
fprintf(fkeluar,'
%3.1f
%7.1f\n',x3,mx3);
end
for x4 = L3:L4;
mx4 = RB.*(L4-x4);
fprintf(fkeluar,'
%3.1f
%7.1f\n',x4,mx4);
end
fprintf(fkeluar,'\n');

fprintf(fkeluar,'===============================\n');
fprintf(fkeluar,'
BIDANG LINTANG\n');
fprintf(fkeluar,'===============================\n');
fprintf(fkeluar,'
x(m)
Dx(kN)\n');
fprintf(fkeluar,'===============================\n');
for x1 = 0:L1;
dx1 = 0.*x1+RA;
fprintf(fkeluar,'
%3.1f
%7.1f\n',x1,dx1);
end
for x2 = L1:L2;
dx2 = 0.*x2+RA-P1;
fprintf(fkeluar,'
%3.1f
%7.1f\n',x2,dx2);
end
for x3 = L2:L3;
dx3 = 0.*x3+RS;
fprintf(fkeluar,'
%3.1f
%7.1f\n',x3,dx3);
end
for x4 = L3:L4;
dx4 = 0.*x4-RB;
fprintf(fkeluar,'
%3.1f
%7.1f\n',x4,dx4);
end
end
if pilihan==2
%Masukan Nilai-nilai raksi perletakan
clc;
Nama_File = input('Nama File (format txt atau doc) ==> ','s');
fbaca = fopen(Nama_File,'rt');
a = fscanf(fbaca,'%f',1);
b = fscanf(fbaca,'%f',1);
c = fscanf(fbaca,'%f',1);
d = fscanf(fbaca,'%f',1);
e = fscanf(fbaca,'%f',1);
q = fscanf(fbaca,'%f',1);
L1 = a;
L2 = a+b;
L3 = a+b+c;
L4 = a+b+c+d;
L5 = a+b+c+d+e;
clc;
% Command window
fprintf('===============================\n');
fprintf('
BESAR GAYA DAN JARAK\n');
fprintf('===============================\n');
fprintf('a = %2.1f m\n',a);
fprintf('b = %2.1f m\n',b);
fprintf('c = %2.1f m\n',c);
fprintf('d = %2.1f m\n',d);
fprintf('e = %2.1f m\n',e);
fprintf('q = %2.1f kN/m\n',q);
% Reaksi Perletakan RA,RB,RF,dan RG. RS1 dan RS2 sebagai Hinge
% Balok A-S1
RA = (q.*a)./2;
RS1 = (q.*a)./2;
% Balok S1-B-S2
RB = (((q.*(c.^2))./2)+((q.*b).*((b./2)+c))+(RS1.*(b+c)))./c;
RS2 = (((q.*(c.^2))./2)-((q.*(b.^2))./2)-(RS1.*b))./c;
% Balok S2-C-D

RC = (((q.*(e.^2))./2)+((q.*d).*((d./2)+e))+(RS2.*(d+e)))./e;
RD = (((q.*(e.^2))./2)-((q.*(d.^2))./2)-(RS2.*d))./e;
% Momen Sama Dengan Nol
Mtitiknol_x1 =(2*RA)/q;
M_nol_1 = 0+Mtitiknol_x1;
Mtitiknol_x2 = (2*RS2)/q;
M_nol_2 = L3-Mtitiknol_x2;
Mtitiknol_x3 = (2*RD)/q;
M_nol_3 = L5-Mtitiknol_x3;
% Lintang Sama Dengan Nol
Dtitiknol_x1 = RA/q;
D_nol_1 = 0+Dtitiknol_x1;
Dtitiknol_x2 = RS2/q;
D_nol_2 = L3-Dtitiknol_x2;
Dtitiknol_x3 = RD/q;
D_nol_3 = L5-Dtitiknol_x3;
% Command window
fprintf('\n');
fprintf('===================================================\n');
fprintf(' NILAI RA,RB,RC,DAN RD.RS1 DAN RS2 SEBAGAI HINGE\n');
fprintf('===================================================\n');
fprintf('RS1 = %2.1f kN\n',RS1);
fprintf('RS2 = %2.1f kN\n',RS2);
fprintf('RA = %2.5f kN\n',RA);
fprintf('RB = %2.5f kN\n',RB);
fprintf('RC = %2.5f kN\n',RC);
fprintf('RD = %2.5f kN\n',RD);
fprintf('\n');
fprintf('====================================\n');
fprintf('
TITIK MOMEN SAMA DENGAN NOL\n');
fprintf('====================================\n');
fprintf('momen nol 1 pada titik %2.1f m \n',M_nol_1);
fprintf('momen nol 2 pada titik %2.1f m \n',M_nol_2);
fprintf('momen nol 3 pada titik %2.1f m \n',M_nol_3);
fprintf('\n');
fprintf('====================================\n');
fprintf('
TITIK LINTANG SAMA DENGAN NOL\n');
fprintf('====================================\n');
fprintf('lintang nol 1 pada titik %2.1f m \n',D_nol_1);
fprintf('lintang nol 2 pada titik %2.1f m \n',D_nol_2);
fprintf('lintang nol 3 pada titik %2.1f m \n',D_nol_3);
% Bidang Momen Balok A-S1
x1 = linspace(0,a,10000);
mx1 = RA.*x1-0.5.*q.*(x1.^2);
% Bidang Momen Balok S1-B-S2
x2 = linspace (a,L2,10000);
mx2 = -RS1.*(x2-L1)-0.5.*q.*((x2-L1).^2);
x3 = linspace (L3,L2,10000);
mx3 = RS2.*(L3-x3)-0.5.*q.*((L3-x3).^2);
% Bidang Momen Balok S2-E-F
x4 = linspace (L3,L4,10000);
mx4 = -RS2.*(x4-L3)-0.5.*q.*((x4-L3).^2);
x5 = linspace (L4,L5,10000);
mx5 = RD.*(L5-x5)-0.5.*q.*((L5-x5).^2);
% Garis Horizontal Sumbu X
x6 = linspace(0,L5,10000);
mx6 = 0.*x3;

% Garis Bantu membuat Fill Bidang Momen


% 0 - L1
x7 = [a 0];
y7 = [0 0];
% L1 - L2
x8 = [L2 L2];
y8 = [(-RS1*b)-0.5*q*(b.^2) 0];
x9 = [L2 L1];
y9 = [0 0];
% L2 - L3
x10 = linspace(M_nol_2,L3,10000);
y10 = RS2.*(L3-x10)-0.5.*q.*((L3-x10).^2);
y11 = 0.*x10;
x16 = linspace(M_nol_2,L2,10000);
y16 = RS2.*(L3-x16)-0.5.*q.*((L3-x16).^2);
y17 = 0.*x16;
% L3 - L4
x18 = [L4 L4];
y18 = [-RS2*d-0.5*q*(d^2) 0];
x19 = [L4 L3];
y19 = [0 0];
% L4 - L5
x20 = linspace(M_nol_3,L5,10000);
y20 = RD.*(L5-x20)-0.5.*q.*((L5-x20).^2);
y21 = 0.*x20;
x22 = linspace(L4,M_nol_3,10000);
y22 = RD.*(L5-x22)-0.5.*q.*((L5-x22).^2);
y23 = 0.*x22;
% Penggabungan Garis Untuk Membuat fill Bidang Momen
r1 = [x1 x7];
t1 = [mx1 y7];
r2 = [x2 x8 x9];
t2 = [mx2 y8 y9];
r3 = [x10 x10];
t3 = [y10 y11];
r4 = [x8 x16 x16];
t4 = [y8 y17 y16];
r5 = [x4 x18 x19];
t5 = [mx4 y18 y19];
r6 = [x20 x20];
t6 = [y20 y21];
r7 = [x18 x22 x22];
t7 = [y18 y23 y23];
%Masukan Gambar Soal
ax(1) = subplot(3,1,1);
soal2 = imread('gambarsoal2.jpg');
image(soal2); title('SOAL 2')
axis auto
% Mencetak PLOT Bidang Momen
subplot(3,1,2)
plot(x1,mx1,x2,mx2,x3,mx3,x4,mx4,x5,mx5,x6,mx6,'k');
fill(r1,t1,'b',r2,t2,'r',r3,t3,'b',r4,t4,'r',r5,t5,'r',r6,t6,'b',r7,t7,'r')
axis auto;
xlabel('Jarak (m)')
ylabel('Momen (kN.m)')
title ('Bidang Momen')

grid on
% Bidang Lintang Balok A-S1
dx1 = RA-q.*x1;
% Bidang Lintang Balok S1-B-S2
dx2 = -RS1-q.*(x2-L1);
dx3 = -RS2+q.*(L3-x3);
% Bidang lintang Balok S2-E-F
dx4 = -RS2-q.*(x4-L3);
dx5 = -RD+q.*(L5-x5);
% Garis Bantu membuat Fill Bidang Lintang
% 0 - L1
x12 = [0 0];
y12 = [0 RA];
x13 = [L2 L2];
y13 = [RA-q*(a+b) -RS2+(q*c)];
x14 = [L4 L4];
y14 = [-RS2*d -RD+(q*e)];
x15 = [L5 L5];
y15 = [0 -RD];
% L1 - L2
x24 = linspace(0,D_nol_1,10000);
y24 = RA-q.*x24;
y25 = 0.*x24;
x26 = linspace (D_nol_1,L1,10000);
y26 = RA-q.*x26;
x27 = [L2 L2];
y27 = [RA-q*(a+b) 0];
x28 = linspace (D_nol_1,L2,10000);
y28 = 0.*x28;
% L2-L3
x29 = [L2 L2];
y29 = [0 -RS2+(q*c)];
x30 = linspace (L2,D_nol_2,10000);
y30 = -RS2+q.*(L3-x30);
y31 = 0.*x30;
x32 = linspace(D_nol_2,L3,10000);
y32 = -RS2+q.*(L3-x32);
% L3-L4
x33 = linspace(L4,D_nol_2,10000);
y33 = 0.*x33;
x34 = [L4 L4];
y34 = [-RS2*d 0];
% L4-L5
x35 = [L4 L4];
y35 = [0 -RD+(q*e)];
x36 = linspace (L4,D_nol_3,10000);
y36 = -RD+q.*(L5-x36);
y37 = 0.*x36;
x38 = linspace(D_nol_3,L5,10000);
y38 = 0.*x38;
y39 = -RD+q.*(L5-x38);
% Penggabungan Garis Untuk Membuat fill Bidang Lintang
w = [x12 x24 x24];
z = [y12 y24 y25];
w2 = [x26 x2 x27 x28];
z2 = [y26 dx2 y27 y28];
w3 = [x29 x30 x30];

z3 = [y29 y30 y31];


w4 = [x32 x4 x34 x33];
z4 = [y32 dx4 y34 y33];
w5 = [x35 x36 x36];
z5 = [y35 y36 y37];
w6 = [x38 x15 x38];
z6 = [y38 y15 y39];
% Mencetak PLOT Bidang Lintang
subplot(3,1,3)
plot(x1,dx1,x2,dx2,x3,dx3,x4,dx4,x5,dx5,x6,mx6,'k',x12,y12,'k',x13,y13,'k',x1
4,y14,'k',x15,y15,'k');
fill(w,z,'b',w2,z2,'r',w3,z3,'b',w4,z4,'r',w5,z5,'b',w6,z6,'r')
axis auto;
xlabel('Jarak (m)')
ylabel('Lintang (kN)')
title ('Bidang Lintang')
grid on
fprintf('\n');
fprintf('===============================\n');
fprintf('
BIDANG MOMEN\n');
fprintf('===============================\n');
fprintf('
x(m)
Mx(kN.m)\n');
fprintf('===============================\n');
for x1 = 0:a;
mx1 = RA.*x1-0.5.*q.*(x1.^2);
fprintf('
%3.0f
%7.1f\n',x1,mx1);
end
for x2 = a:L2;
mx2 = -RS1.*(x2-L1)-0.5.*q.*((x2-L1).^2);
fprintf('
%3.0f
%7.1f\n',x2,mx2);
end
for x3 = L2:L3;
mx3 = RS2.*(L3-x3)-0.5.*q.*((L3-x3).^2);
fprintf('
%3.0f
%7.1f\n',x3,mx3);
end
for x4 = L3:L4;
mx4 = -RS2.*(x4-L3)-0.5.*q.*((x4-L3).^2);
fprintf('
%3.0f
%7.1f\n',x4,mx4);
end
for x5 = L4:L5;
mx5 = RD.*(L5-x5)-0.5.*q.*((L5-x5).^2);
fprintf('
%3.0f
%7.1f\n',x5,mx5);
end
fprintf('\n');
fprintf('===============================\n');
fprintf('
BIDANG LINTANG\n');
fprintf('===============================\n');
fprintf('
x(m)
Dx(kN)\n');
fprintf('===============================\n');
for x1 = 0:a;
dx1 = RA-q.*x1;
fprintf('
%3.0f
%7.1f\n',x1,dx1);
end
for x2 = a:L2;
dx2 = -RS1-q.*(x2-L1);
fprintf('
%3.0f
%7.1f\n',x2,dx2);

end
for x3 = L2:L3;
dx3 = -RS2+q.*(L3-x3);
fprintf('
%3.0f
%7.1f\n',x3,dx3);
end
for x4 = L3:L4;
dx4 = -RS2-q.*(x4-L3);
fprintf('
%3.0f
%7.1f\n',x4,dx4);
end
for x5 = L4:L5;
dx5 = -RD+q.*(L5-x5);
fprintf('
%3.0f
%7.1f\n',x5,dx5);
end
File_Nama = input('Save Dengan Nama ==> ','s');
fkeluar = fopen(File_Nama,'wt');
fprintf(fkeluar,'===============================\n');
fprintf(fkeluar,'
BESAR GAYA DAN JARAK\n');
fprintf(fkeluar,'===============================\n');
fprintf(fkeluar,'a = %2.1f m\n',a);
fprintf(fkeluar,'b = %2.1f m\n',b);
fprintf(fkeluar,'c = %2.1f m\n',c);
fprintf(fkeluar,'d = %2.1f m\n',d);
fprintf(fkeluar,'e = %2.1f m\n',e);
fprintf(fkeluar,'q = %2.1f kN/m\n',q);
fprintf(fkeluar,'\n');
fprintf(fkeluar,'===================================================\n');
fprintf(fkeluar,' NILAI RA,RB,RC,DAN RD.RS1 DAN RS2 SEBAGAI HINGE\n');
fprintf(fkeluar,'===================================================\n');
fprintf(fkeluar,'RS1 = %2.1f kN\n',RS1);
fprintf(fkeluar,'RS2 = %2.1f kN\n',RS2);
fprintf(fkeluar,'RA = %2.5f kN\n',RA);
fprintf(fkeluar,'RB = %2.5f kN\n',RB);
fprintf(fkeluar,'RC = %2.5f kN\n',RC);
fprintf(fkeluar,'RD = %2.5f kN\n',RD);
fprintf(fkeluar,'\n');
fprintf(fkeluar,'\n');
fprintf(fkeluar,'====================================\n');
fprintf(fkeluar,'
TITIK MOMEN SAMA DENGAN NOL\n');
fprintf(fkeluar,'====================================\n');
fprintf(fkeluar,'momen nol 1 pada titik %2.1f m \n',M_nol_1);
fprintf(fkeluar,'momen nol 2 pada titik %2.1f m \n',M_nol_2);
fprintf(fkeluar,'momen nol 3 pada titik %2.1f m \n',M_nol_3);
fprintf(fkeluar,'\n');
fprintf(fkeluar,'====================================\n');
fprintf(fkeluar,'
TITIK LINTANG SAMA DENGAN NOL\n');
fprintf(fkeluar,'====================================\n');
fprintf(fkeluar,'lintang nol 1 pada titik %2.1f m \n',D_nol_1);
fprintf(fkeluar,'lintang nol 2 pada titik %2.1f m \n',D_nol_2);
fprintf(fkeluar,'lintang nol 3 pada titik %2.1f m \n',D_nol_3);
fprintf(fkeluar,'\n');
fprintf(fkeluar,'===============================\n');
fprintf(fkeluar,'
BIDANG MOMEN\n');
fprintf(fkeluar,'=================================\n');
fprintf(fkeluar,'
x(m)
Mx(kN.m)\n');
fprintf(fkeluar,'=================================\n');
for x1 = 0:a;
mx1 = RA.*x1-0.5.*q.*(x1.^2);

fprintf(fkeluar,'
%3.0f
%7.1f\n',x1,mx1);
end
for x2 = a:L2;
mx2 = -RS1.*(x2-L1)-0.5.*q.*((x2-L1).^2);
fprintf(fkeluar,'
%3.0f
%7.1f\n',x2,mx2);
end
for x3 = L2:L3;
mx3 = RS2.*(L3-x3)-0.5.*q.*((L3-x3).^2);
fprintf(fkeluar,'
%3.0f
%7.1f\n',x3,mx3);
end
for x4 = L3:L4;
mx4 = -RS2.*(x4-L3)-0.5.*q.*((x4-L3).^2);
fprintf(fkeluar,'
%3.0f
%7.1f\n',x4,mx4);
end
for x5 = L4:L5;
mx5 = RD.*(L5-x5)-0.5.*q.*((L5-x5).^2);
fprintf(fkeluar,'
%3.0f
%7.1f\n',x5,mx5);
end
fprintf(fkeluar,'\n');
fprintf(fkeluar,'===============================\n');
fprintf(fkeluar,'
BIDANG LINTANG\n');
fprintf(fkeluar,'===============================\n');
fprintf(fkeluar,'
x(m)
Dx(kN)\n');
fprintf(fkeluar,'===============================\n');
for x1 = 0:a;
dx1 = RA-q.*x1;
fprintf(fkeluar,'
%3.0f
%7.1f\n',x1,dx1);
end
for x2 = a:L2;
dx2 = -RS1-q.*(x2-L1);
fprintf(fkeluar,'
%3.0f
%7.1f\n',x2,dx2);
end
for x3 = L2:L3;
dx3 = -RS2+q.*(L3-x3);
fprintf(fkeluar,'
%3.0f
%7.1f\n',x3,dx3);
end
for x4 = L3:L4;
dx4 = -RS2-q.*(x4-L3);
fprintf(fkeluar,'
%3.0f
%7.1f\n',x4,dx4);
end
for x5 = L4:L5;
dx5 = -RD+q.*(L5-x5);
fprintf(fkeluar,'
%3.0f
%7.1f\n',x5,dx5);
end
end

You might also like