nx=1:1000;
ny=1:1000;
nz=1:10;

dx=100;
dy=100;
dz=1;

if nz(end)*ny(end)*nx(end) > 400^3
    error 'too large'
else
    N = perm(nx,ny,nz);
    E = N(:,1).^2/dx^2+N(:,2).^2/dy^2+N(:,3).^2/dz^2;
end