We tried running the aforementioned example however we were getting a few errors
The first error being that it says "error using *" in the following
input_signal = (source_strength./(medium.sound_speed*medium.density)).*inputsignal
Can anyone please help us on how to correct this error
% defining an ultrasound sognle frequency toneburst
sample_frequency =20000000;
signal_frequency =1000000;
num_cycles = 10;
Nx =128;
Ny =128;
Nz =128;
dx = .00001;
dy = .00001;
dz = .00001;
kgrid = makeGrid(Nx,dx,Ny,dy,Nz,dz);
kgrid.t_array = makeTime(kgrid,1500);
medium.sound_speed =1500*ones(Nx,Ny,Nz);
medium.sound_speed(1:Nx/2,:,:)=1800;
medium.density =1000*ones(Nx,Ny,Nz);
medium.density(:,Ny/4:end, :)=1200;
signal = toneBurst(sample_frequency,signal_frequency,num_cycles);
toneBurst(sample_frequency,signal_frequency,num_cycles,'Plot',true);
source_strength = 1*10^6;
tone_burst_freq = .5*10^6;
tone_burst_cycles = 5;
input_signal = toneBurst(1/kgrid.dt,tone_burst_freq,tone_burst_cycles);
imput_signal = (source_strength./(medium.sound_speed*medium.density)).*input_signal;
transducer.number_elements = 64;
transducer.element_width =1 ;
transducer.element_length = 12;
transducer.element_spacing = 0;
transducer.radius = inf;
transducer_width = transducer.number_elements*transducer.element_width + (transducer.number_elements -1)*transducer.element_spacing;
transducer.position = round([1,32-transducer_width/2,32-transducer.element_length/2]);
transducer.sound_speed = 1540;
transducer.focus_distance = 20*10^-3;
transducer.elevation_focus_distance = 19*10^-3;
transducer.steering_angle = 0;
transducer.transmit_apodization = 'Rectangular';
transducer.receive_apodization = 'Rectangular';
transducer.active_elements = zeros(transducer.number_elements,1);
transducer.active_elements(21:52) = 1;
transducer.input_signal = input_signal;
transducer = makeTransducer(kgrid,transducer);
[sensor_data] = kspaceFirstOrder3D(kgrid,medium,transducer, sensor,input_args{:});