Hi all,
I noticed that the makeSphere Function does not work, wenn Nx, Ny, and Nz are not the same. For example, when using a grid of 256x512x512 with a sphere of radius 64, the function will fail with the error:
Error using +
Matrix dimensions must agree.
Error in makeSphere (line 109)
sphere(centerpoints(centerpoint_index), :, :) = circle + circle_fill;
Same for 512x256x512 and 512x512x256.
It seems that the dimensions for circle_fill are off, and line 81 in the same file should read circle_fill = zeros(Ny, Nz);
instead of circle_fill = zeros(Nx, Ny);
This was just a guess based on the dimensions of the variables but seems to work.