Hi,
I just installed the k-wave toolbox and tried to run the examples, but I always get the same error (Matlab 2018b):
Matrix dimensions must agree.
Error in kspaceFirstOrder2D (line 920)
ux_sgx = dt .* rho0_sgx_inv .* real(ifft2( bsxfun(@times, ddx_k_shift_pos,
kappa .* fft2(p)) )) / 2;
Error in example_3_ivp_opposing_corners_sensor_mask (line 82)
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor);
The reason for the error is that in the function 'bsxfun(@times, ddx_k_shift_pos, kappa .* fft2(p))' the variable 'kappa' is of size NxN (128x128 in example_ivp_homogeneous_medium), while 'fft2(p)' is of the size (N^2)x1 (16384).