I have a code to generating phantom data in MATLAB but my final plot is in 3D. I searched throught mathwork and could find some solutions such as this one:
but this did not work on this plot
This is my code and results:
phantom_min_coords=[-5 0 35]*1e-3;
phantom_lengths=[10 0 10]*1e-3;
positions=( rand(N_scatterers,3).*phantom_lengths )+phantom_min_coords;
amplitudes=ones(N_scatterers,1);
if sum((positions(n,:)-[0 0 40]*1e-3).^2)<(2.5e-3)^2
figure,plot3(positions(s,1)*1e3,positions(s,2)*1e3,positions(s,3)*1e3,'b.','MarkerSize',10);
plot3(positions(s,1)*1e3,positions(s,2)*1e3,positions(s,3)*1e3,'k.','MarkerSize',10);
I commented the final two lines of the code, however it did not work for this example.