hello brad
I am trying to run this code
% based on Heterogeneous Propagation Medium Example
% 3rd April 2012
clear all;
% create the computational grid
Nx = 512; % number of grid points in the x (row) direction
dx = 1e-3; % grid point spacing in the x direction [m]
kgrid = makeGrid(Nx, dx);
% define the properties of the propagation medium
region1 = (kgrid.x > -Nx/3*dx) .* (kgrid.x < 0);
region2 = (kgrid.x >= 0) .* (kgrid.x < 0.25*Nx/4*dx);
medium.sound_speed = 1500*ones(Nx,1); % [m/s]
medium.sound_speed(region1==1) = 2000;
medium.sound_speed(region2==1) = 2200;
medium.density = 1000*ones(Nx,1); % [kg/m^3]
medium.density(region1==1) = 1500;
medium.density(region2==1) = 1800;
% define the initial pressure distribution
mua = 10;
p0 = exp(-mua*kgrid.x).*region2;
source.p0 = p0;
%define a sensor
sensor.mask = zeros(Nx,1);
% run the simulation
sensor_data = kspaceFirstOrder1D(kgrid, medium, source, sensor);
but i am encountered with this error !!!
Error using kspaceFirstOrder_inputChecking (line 523)
sensor.mask must be a binary grid with at least one element set to 1
Error in kspaceFirstOrder1D (line 433)
kspaceFirstOrder_inputChecking;
Error in k_wave_example_for_Mohsen_201412 (line 64)
sensor_data = kspaceFirstOrder1D(kgrid, medium, source, sensor);
what is its problem?
thnx for your kindly guidance and merry chrismass
best wishes