Professional Documents
Culture Documents
Cover Pak Irsan
Cover Pak Irsan
Cover Pak Irsan
dibuat oleh:
%function xdot = f( s, x )
%eps = 0.00737;
c0s = 1500;
zz = 0:5000;
zs1 = 2500;
g1 = 0.01;
g2 = -0.01;
%xt = 2 * ( z - 1300 ) / 1300;
for iz = 1:length(zz),
if zz(iz) < 0,
if zz(iz) >= -zs1,
c(iz) = c0s - g1*(zz(iz)+zs1);
else
c(iz) = c0s - g2*(zz(iz)+zs1);
end
end
if zz(iz) >= 0,
if zz(iz) <= zs1,
c(iz) = c0s + g1*(zz(iz)-zs1);
else
c(iz) = c0s + g2*(zz(iz)-zs1);
end
end
end
%zz(1001)
%c(1001)
subplot(1,2,1), plot(c,zz)
axis ij
xlabel('Sound Speed (m/s)')
ylabel('Depth (m)')
SVP5.m
function xdot = f( s, x )
c0s = 1500;
z = x(2);
zs1 = 2500;
g1 = 0.01;
g2 = -0.01;
%xt = 2 * ( z - 1300 ) / 1300;
if z < 0,
if z >= -zs1,
c = c0s - g1*(z+zs1);
else
c = c0s - g2*(z+zs1);
end
end
if z >= 0,
if z <= zs1,
c = c0s + g1*(z-zs1);
else
c = c0s + g2*(z-zs1);
end
end
c2 = c^2;
cr = 0;
xdot = zeros( 4, 1 );
xdot( 1 ) = c * x( 3 );
xdot( 2 ) = c * x( 4 );
xdot( 3 ) = -cr / c2;
xdot( 4 ) = -cz / c2;
RAYS1.m
% ******************************************************
% Rays
% ******************************************************
clear all
close all
% subplot(1,2,2), plot( x( : , 1 ), x( : , 2 ) );