For a plane_wave some combinations of dimensions yield an error. Try:
f = 2000;
xs = [0, -1, 0];
P = sound_field_mono_plane_wave(0,0,0,xs,f,conf); % works
P = sound_field_mono_plane_wave([-1,1],0,0,xs,f,conf); % works
P = sound_field_mono_plane_wave(0,[-1,1],0,xs,f,conf); % does not work
P = sound_field_mono_plane_wave(0,0,[-1,1],xs,f,conf); % does not work
P = sound_field_mono_plane_wave([-1,1],[-1,1],0,xs,f,conf); % works
P = sound_field_mono_plane_wave([-1,1],0,[-1,1],xs,f,conf); % works
P = sound_field_mono_plane_wave(0,[-1,1],[-1,1],xs,f,conf); % does not work
P = sound_field_mono_plane_wave([-1,1],[-1,1],[-1,1],xs,f,conf); % does not work
This has something to do with the computations for pw in greens_function_mono, but I was not able to understand, what is happening there. I think, we did not test the pw option when we added non-regular grids to the toolbox (see #33).
P.S.: Maybe also a simplification of the computation can be done.
For a plane_wave some combinations of dimensions yield an error. Try:
This has something to do with the computations for
pw
ingreens_function_mono
, but I was not able to understand, what is happening there. I think, we did not test thepw
option when we added non-regular grids to the toolbox (see #33).P.S.: Maybe also a simplification of the computation can be done.