You are on page 1of 1

====== LILA ======

thickness = 0.3 ;
x = 15;
dx = thickness/x;
dt = 440;
time = 22000;
step = time/dt ;
K = 5*(10^-6.5);

for i=1:step
for j=1:x
bata(i,j)=0;
if i==1
bata(i,j)=100;
end
end
end

alpha = K * dt / (dx^2);
for i=2:step-1
for j=1:x-1
bata(i,j+1)= bata(i,j) + alpha * (bata(i-1,j)-(2*bata(i,j))+bata(i+1,j)) ;
bata(i,1)=20;
bata(i,x)=20;
end
end

====== AKUSTIK =======

c1=500; rho1=10;
c2=1500; rho2=1250;
teta1=linspace(0,pi/2,1500);

teta2=asin((c2/c1)*(sin(teta1)));

Z1=rho1*c1./(cos(teta1));
Z2=rho2*c2./(cos(teta2));

%% hitung R

R = (Z1-Z2)./(Z1+Z2);

You might also like