ele_delay(Th, element_no, delays) 详解
ele_delay(Th, element_no, delays);
表示对换能器某阵元的组成部分进行延迟。若阵元由2-by-3个子元素组成,相应的delays应该设置为一个1-by-6向量。
诸如:ele_delay(Th2,i,[1 2 3 4 5 6]/1e6);
ele_delay(Th,element_no,delays)这个函数应该是把孔径Th按照输入的数组对每个阵元进行延时
f0=3.5e6; %Transducercenterfrequency[Hz] fs=100e6; %Samplingfrequency[Hz] c=1540; %Speedofsound[m/s] lambda=c/f0; %Wavelength[m] height=5/1000; %Heightofelement[m] width=1/1000; %Widthofelement[m] kerf=0.5/1000; %Distancebetweentransducerelements[m] N_elements=16; %Numberofelements N_elements2=16; %Numberofelements focus=[0 0 70]/1000; %Initialelectronicfocus focus2=[0 0 70]/1000; Th=xdc_linear_array(N_elements,width,height,kerf,2,3,focus); Th2=xdc_linear_array(N_elements2,width,height,kerf,2,3,focus2); impulse_response=sin(2*pi*f0*(0:1/fs:2/f0)); impulse_response=impulse_response.*hanning(max(size(impulse_response)))'; xdc_impulse(Th,impulse_response); xdc_impulse(Th2,impulse_response); excitation=sin(2*pi*f0*(0:1/fs:2/f0)); xdc_excitation(Th,excitation); N=100;%Number of scatterers positions=[0 0 70]/1000; positions2=[0 0 50]/1000; amp=randn(N,1);
%%%%%%%%%%%%%%%%%%%%%%%%% i=N_elements/2 ele_delay(Th2,i,[1 2 3 4 5 6]/1e6); //对第八个阵元加延时 %%%%%%%%%%%%%%%%%%%%%%%%%%%Index exceeds matrix dimensions. [v,t]=calc_scat_multi(Th,Th2,positions,1); [N,M]=size(v); scale=max(max(v)); v=v/scale; for i=1:M plot((0:N-1)/fs+t,v(:,i)+i),hold on end hold off title('Individualtraces') xlabel('Time') ylabel('Normalizedresponse') axis([t t+N/fs 0 M+1])