-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathl_extend.m
40 lines (35 loc) · 929 Bytes
/
l_extend.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function wlog=l_extend(wlog,from,to)
% Function extends the depth range of a log structure by
% appending/prepending null values
% Written by: E. R.: October 4, 2002
% Last updated:
%
% wlog=l_extend(wlog,from,to)
% INPUT
% wlog log structure
% from starting depth
% to final depth
% OUTPUT
% wlog extended log
wlog=l_select(wlog,{'depths',from,to});
step=wlog.step;
if wlog.first > from & wlog.last < to
wlog.first=from;
wlog.last=to;
wlog.curves=[wlog.null*ones(1,size(wlog.curves,2));wlog.curves; ...
wlog.null*ones(1,size(wlog.curves,2))];
else
if wlog.first > from
wlog.first=from;
wlog.step=0;
wlog.curves=[wlog.null*ones(1,size(wlog.curves,2));wlog.curves];
end
if wlog.last < to
wlog.last=to;
wlog.step=0;
wlog.curves=[wlog.curves;wlog.null*ones(1,size(wlog.curves,2))];
end
end
if step > 0
wlog=l_resample(wlog,step);
end