1、创建一个线阵探头Th = xdc_linear_array(no_elements, width, height, kerf, no_sub_x, no_sub_y, focus);Input: no_elements Number of physical elements.Width:Width in x-direction of elements.Height:Width in y-direction of elements.Kerf:Distance in x-direction between elements.No_sub_x Number of sub-divisions in x
2、-direction of elements. (虚拟单元,用于计算)No_sub_y Number of sub-divisions in y-direction of elements.focus Fixed focus for array (x,y,z). Vector with three elements.Output: Th A pointer to this transducer aperture.Example of transducer denition:Create a 16 elements linear array, and divide the physical el
3、ements into 2 by 3 mathematical elements to increase the accuracy of the simulation.height=5/1000; % Height of element mwidth=1/1000; % Width of element mkerf=width/4; % Distance between transducer elements mN_elements=16; % Number of elementsfocus=0 0 40/1000; % Initial electronic focusTh = xdc_lin
4、ear_array (N_elements, width, height, kerf, 2, 3, focus);空间中一点的冲击响应h, start_time = calc_h(Th,points);Input: Th:Pointer to the transducer aperture.Points: Field points. Vector with three columns (x,y,z) and one row for each eld point.output: h:Spatial impulse response in m/s.start_time:The time for the rst sample in h.