summaryrefslogtreecommitdiff
path: root/xmds2
diff options
context:
space:
mode:
Diffstat (limited to 'xmds2')
-rw-r--r--xmds2/Nlevels_with_doppler_with_z_4wm/fast_to_slow_switch/map2dat.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmds2/Nlevels_with_doppler_with_z_4wm/fast_to_slow_switch/map2dat.m b/xmds2/Nlevels_with_doppler_with_z_4wm/fast_to_slow_switch/map2dat.m
index 969b6dc..4f4ca52 100644
--- a/xmds2/Nlevels_with_doppler_with_z_4wm/fast_to_slow_switch/map2dat.m
+++ b/xmds2/Nlevels_with_doppler_with_z_4wm/fast_to_slow_switch/map2dat.m
@@ -9,17 +9,17 @@ function map2dat(outfile, x,y,z, xskip, yskip)
Nx=length(x);
Ny=length(y);
-Nxs=Nx/xskip;
-Nys=Ny/yskip;
+Nxs=ceil(Nx/xskip);
+Nys=ceil(Ny/yskip);
points=zeros(1,3*Nxs*Nys);
%points=[];
tic;
for i=1:Nxs
for k=1:Nys
%points=[points x(i*xskip) y(k*yskip) z(k*yskip,i*xskip)];
- points((i-1)*(Nys-1)*3+3*(k-1)+1) = x(i*xskip);
- points((i-1)*(Nys-1)*3+3*(k-1)+2) = y(k*yskip);
- points((i-1)*(Nys-1)*3+3*(k-1)+3) = z(k*yskip,i*xskip);
+ points((i-1)*(Nys)*3+3*(k-1)+1) = x(1+(i-1)*xskip);
+ points((i-1)*(Nys)*3+3*(k-1)+2) = y(1+(k-1)*yskip);
+ points((i-1)*(Nys)*3+3*(k-1)+3) = z(1+(k-1)*yskip,1+(i-1)*xskip);
end
end
disp('=== points formation complete ===');