function simulate_usound()

% basic parameters
soundSpeed = % [m/s]
samplingFrequency = % [Hz]
set_sampling(samplingFrequency);

%% parameters of the emitting / receiving elements
nElements = % []
kerf =  % [m]
width =  % [m]
height = % [m]
focalPoint =  % [m]
widthSubdivision = %
heightSubdivision = %

%% Create emitter and receiver as linear arrays
hndEmitter = xdc_linear_array(nElements, width, height, kerf, widthSubdivision, heightSubdivision, focalPoint);
hndReceiver = xdc_linear_array(nElements, width, height, kerf, widthSubdivision, heightSubdivision, focalPoint);

%% Apodization settings (for Task 2 (BONUS))
% create apodization for the emitter array and pass it to the hndEmitter
% through xdc_apodization

%% For visualization - display the emitter array
% figure;
% show_xdc(hndEmitter);

%% Set response and excitation parameters
centralFrequency = % [Hz]
fractionalBandwidth = % [%]
excitationSignal = 1; % dirac signal

% Use gauspuls() with cutoff settings to create impuls response
tc = gauspuls('cutoff', centralFrequency, fractionalBandwidth, [], -40);
t = -tc : 1/samplingFrequency : tc;
impulseResponse = gauspuls(t, centralFrequency, fractionalBandwidth);

% Set impulse response
xdc_impulse(hndEmitter, impulseResponse);
xdc_impulse(hndReceiver, impulseResponse);

% set excitation signal of the emitter
xdc_excitation(hndEmitter, excitationSignal);

%% Task 2 : Measure emitted pressure on three lines
%   x from [-1.5, 1.5] [mm] with step-size 0.02 [mm]
%   y constant 0
%   z varies for each line, create separate lines at 
%       z = [focus - offset, focus, focus + offset]
x = %
y = %
z = % 

% create stacked points (x, y and z coordinates as columns)
hPoints = %

% use the calc_hp function to simulate the time-dependent pressure values
% in the measured points hPoints
% [emittedPressureField, startTime] = calc_hp( hndEmitter, hPoints);

% plot the pressure field in the coordinates [x, t] for t = [startTime,
% ...]
% Hint: Group plots for the three evaluated positions in a single figure 
%       as subplots (two rows, three plots each). 
%       Top: Plot the profile for each line with imagesc, y-axis shows the
%       time for t >= startTime returned by the calc_hp function
%       Bottom: Plot the normalized pressure maximum (maximum over time)



%% Task 3
% Add some scatter points to the simulated space and record the
% time-dependent activations of the receiver elements.

% x, y and z positions of two scatter sources
positions = [0.5 0 20; 0 0 10] / 1000;
% their reflected amplitude
amp = [1; 1];

% calculate the measured signal in receiver elements
% [V, t] = calc_scat_multi (hndEmitter, hndReceiver, positions, amp);

% Plot the time-dependent normalized response function for each element with small offset

% Plot the time-dependent sum over all elements of the normalized response
% functions




end