Hello together,
I really enjoy using this toolbox for my master sc. - project (photoakustic imaging via annular ordered transducerelements). Until now, I have been working with the toolbox for simuations in 2D - things seem to work, but when I try to generate 3D kgrid I get errors. That´s my code:
clear all;
c0=1500; %[m/s]
f_mean=5.5e6; %[Hz]
f_max=10e6;%[Hz]
x_size=0.15; y_size=x_size;
z_size=0.05; %transducerelement z-dimension: 20mm
%Compute d_ and N_ based on domain size and f_max
c0_min=c0; %c0_min: smallest speed of sound in the medium
points_per_wavelength=3;
dx=c0_min/(points_per_wavelength*f_max); dy=dx; dz=dx;
Nx=round(x_size/dx);
Ny=round(y_size/dy);
Nz=round(z_size/dz);
%Create grid
kgrid=makeGrid(Nx,dx,Ny,dy,Nz,dz);
When I use "makeGrid", I get:
Error using makeGrid (line 41)
User defined classes are not supported in this version of MATLAB. Please use a more recent version of MATLAB, or k-Wave V1.1.
When I use "kWaveGrid" instead, I get:
Error in kWaveGrid (line 424)
kgrid.k = zeros(kgrid.Nx, kgrid.Ny, kgrid.Nz);
I am a little bit confused - the Matlab version i use (R2017b) should be up to date enough!
Does anybody is familiar with this problem? I am hesitating to move to an older version of k-wave, since I really want to use the fast and gpu - optimized code of the newer versions!
Kind Regards!
Daniel