, transducer, transducer, input_args{:});

    <span class="comment">% extract the scan line from the sensor data</span>
    scan_lines(scan_line_index, :) = transducer.scan_line(sensor_data);
        
    <span class="comment">% update medium position</span>
    medium_position = medium_position + transducer.element_width;

end
</pre>

<a name="heading5"></a>
<h2>Processing steps</h2>

<p>After simulation, a number of steps are required to process the raw transducer data into an ultrasound image. In this e