You are currently browsing the tag archive for the ‘geology programming’ tag.
Program ini berisi menampilkan lapisan 2 dimensi yang mempunyai nilai densitas atau kecepatan // this program contain showing a 2-D layer that have a value density or velocity
Program ini prototipe untuk tomografi // This is Prototipe for tomography
Pada penjalanan program kita diminta untuk menuliskan koordinat yang akan di chek atau dicari kecepatannya, hasilnya ditampilkan di layar
script :
% PROGRAM LAYER TOMOGRAFI
clear;
clc;
a=0:100;b=0:100;
[x,y]=meshgrid(a,b);
plot(x,y,’.white’),hold on % horee..coba coba kata “white” eh bisa
plot(0,10,’*r’);plot(0,30,’*r’);plot(0,60,’*r’);plot(0,90,’*r’),hold on;
% gambar template
a=0:100;b=80:100;
[x,y]=meshgrid(a,b);
plot(x,y,’.b’),hold on
a=50:100;b=60:80;
[x,y]=meshgrid(a,b);
plot(x,y,’.b’),hold on
a=0:50;b=60:80;
[x,y]=meshgrid(a,b);
plot(x,y,’.g’)
a=0:100;b=40:60;
[x,y]=meshgrid(a,b);
plot(x,y,’.g’)
a=0:100;b=20:40;
[x,y]=meshgrid(a,b);
plot(x,y,’.c’)
a=0:100;b=0:20;
[x,y]=meshgrid(a,b);
plot(x,y,’.m’)
a=input(‘masukkan nilai a ‘)
b=input(‘masukkan nilai b ‘)
% inisiasi kecepatan tiap lapisan
if (b<=20)
v=3500;
elseif b<=40
v=3000;
elseif ((b<=80)&(a<=50))||((b<=60)&(a>50))
v=2500;
else
v=2000;
end
disp(['maka kecepatan adalah =' num2str(v)])


Memisahkan data batuan berdasarkan gradien dari dua parameter// separate a rocks data due to gradien of 2 parameters
File input.dat sebagai data // input.dat file as data
File plo.dat sebagai file untuk parameter garis pembatas // plo.dat files for gradient (separator line)
SCRIPT :
————————————————————————————————————–
% plot dan memilah
% load data dulu
clear;
clc;
load input.dat
load plo.dat
x=input(:,3);
y=input(:,2);
z=input(:,1);
a=plo(:,1);
b=plo(:,2);
figure(1)
plot(x,y,’*'),hold on
plot(a,b,’-*r’)
%————–
f1=polyfit(a,b,1)
y1=polyval(f1,x)
%————
figure(3)
for i=1:1:length(x)
if y(i)<=y1(i)
plot(x(i),y(i),’*g’), hold on
depth(i)=z(i);
rock(i)=100; % id batuan
else
plot(x(i),y(i),’*c’),hold on
depth(i)=z(i);
rock(i)=200; % id batuan
end
%plot(x,y1,’o')
end
plot(a,b,’-*r’)
hasil=[depth' rock']
save hasil.dat hasil -ascii
figure(4)
for i=1:1:length(x)
if y(i)<=y1(i)
plot3(x(i),y(i),z(i),’*g’),grid on, hold on
depth(i)=z(i);
rock(i)=100;
else
plot3(x(i),y(i),z(i),’*c’),grid on,hold on
depth(i)=z(i);
rock(i)=200;
end
end
plot(a,b,’-*r’)
———————————————————————————————————-
result :
before separate

before separate
After separate

After separate
Warna biru menunjukkan batuan Dolomit, warna hijau menunjukkan batuan Limestone // blue color show a dolomite, and green to limestone
File hasil pemisahan tersebut disimpan pada file “hasil.dat”. Dolomit dan limestone diidentifikasikan dengan harga yaitu 100 dan 200 (lihat warna kuning) // result save in ” hasil.dat” . Dolomite and limestone identified with value 100 and 200

comments