-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathASET_ParamStatic.m
48 lines (34 loc) · 1.19 KB
/
ASET_ParamStatic.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
41
42
43
function [St]=ASET_ParamStatic(M,V,R)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function determinate the size of the array for the different read
% format file and module used.
% by Dominguez Ruben L. FICH-UNL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if M==1 %Single section, Multisection
%Size
[St.nvel,St.mvel]=size(V.mcsMag);
[St.nback,St.mback]=size(V.mcsBack);
%cell size
for j=1:St.mvel
for i=1:St.nvel
if i==1
St.cell(i,j)=V.mcsDepth(i+1,j)-V.mcsDepth(i,j);%take the same value that the second row
else
St.cell(i,j)=V.mcsDepth(i,j)-V.mcsDepth(i-1,j);
end
end
end
elseif M==2%Calibration
[St.nvel,St.mvel]=size(R.Depth_m);
[St.nback,St.mback]=size(R.Depth_m);
%cell size
for j=1:St.mvel
for h=1:St.nvel
if h==1
St.cell(h,j)=R.Depth_m(h+1,j)-R.Depth_m(h,j);%take the same value that the second row
else
St.cell(h,j)=R.Depth_m(h,j)-R.Depth_m(h-1,j);
end
end
end
end