Hi all,

I'm currently working on 1D photoacoustic simulation in an heterogeneous medium. The high difference in the medium properties (from solid to air) at the boundary makes the simulation go wrong.

I think that setting the kgrid to non uniform (a large step away from the boundaries, and a narrow step close to them) would help me but I don't quite understand how to use the setNUgrid function.

What are the different arguments of this function ? here is the beginning of my code

```
Nx = 1024; % number of grid points in the x (row) direction
dx = 0.05e-3; % grid point spacing in the x direction [m]
kgrid = makeGrid(Nx, dx);
X = 0:dx:abs(Nx*dx);
in = (0:pi/(width/2):2*pi).';
gradient= %some gradient function ?
kgrid_test = setNUGrid(kgrid,1,X,gradient,1,1);
```

kgrid_test is set to non uniform but with some gradient vectors tested, the parameter kgrid_test.x is still uniformly spaced.

Best,

Adrien