what is written below i cant read that

2 views (last 30 days)
clear all
Tr=2.5e-6;
Br=50e6;
Kr=Br/Tr;
Fr=1.2*Br;
f0=9.4e9;
c=3e8;
La=1;
Vr=250;
Fa=1.3*0.886*2*Vr/La;
theta=0;
R0=[30000 30000 30500];Rmin=29805;Rmax=30695;TWr=2*(Rmax-Rmin)/c;
X0=[450 550 550];Xmax=1000;TWa=Xmax/Vr;
Ta=0.886*R0*c/La/Vr/f0;
Na=floor(TWa*Fa+1);
t=(2*Rmin/c:1/Fr:2*Rmax/c)'*ones(1,Na);
ta=ones(TWr*Fr+1,1)*(0:1/Fa:TWa);
s0=zeros(TWr*Fr+1,Na);
for i=1:length(R0)
R=sqrt(R0(i)^2+(X0(i)-Vr*ta).^2);
s0=s0+exp(-1i*4*pi*f0*R/c+1i*pi*Kr*(t-2*R/c).^2).*(abs(t-2*R/c)<Tr/2).*(abs(ta-X0(i)/Vr)<Ta(i)/2);
end
%====================RDA=========================
st=exp(-1i*pi*Kr*(-Tr/2:1/Fr:Tr/2).^2);
N=length(st)+(TWr*Fr+1)-1;
Hr=fft(st,N).'*ones(1,Na);
src=ifft(fft(s0,N).*Hr);
fr=linspace(-Fr/2,Fr/2,N)'*ones(1,Na);
fa=linspace(-Fa/2,Fa/2,Na);
sf2=fftshift(fft2(src));
detaR=(c^2*30250*(ones(N,1)*fa).^2/f0^2/8/Vr^2);
srd=ifft(sf2.*exp(1i*4*pi*fr.*detaR/c)).';
Rc=(-Tr/2+2*Rmin/c:1/Fr:Tr/2+2*Rmax/c)*c/2;
Kac=2*Vr^2*f0/c./Rc;
sac=zeros(TWa*Fa+1,N);
for i=1:N
Ha=exp(-1i*pi/Kac(i)*fa.^2);
sac(:,i)=srd(:,i).*Ha.';
end
sac=ifft(sac);
%===================figure======================
figure(1);imagesc(abs(s0.'));xlabel('¾àÀëÏò');ylabel('·½Î»Ïò')
figure(2);imagesc(abs(src.'));xlabel('¾àÀëÏò');ylabel('·½Î»Ïò')
figure(3);imagesc(abs(srd));xlabel('¾àÀëÏò');ylabel('·½Î»Ïò')
figure(4);imagesc(abs(sac));xlabel('¾àÀëÏò');ylabel('·½Î»Ïò')
figure(5);plot(20*log10(abs(sac(:,354))/max(abs(sac(:,354)))))
  5 Comments
Walter Roberson
Walter Roberson on 14 May 2019
It looks like the source might have been a place such as https://wenku.baidu.com/view/18d13e5fbe23482fb4da4c0a.html?re=view
I cannot seem to view the content myself at the moment, but the cache shows the code to be there.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 18 May 2019
The comments are in GB2312.
%===============²úÉú»Ø²¨Êý¾Ý======================
Translates as:
Generate echo data
src=ifft(fft(s0,N).*Hr);%¾àÀëѹËõ,Ä渵ÀïÒ¶±ä»¯ºóʱ¼äÆðʼµãΪÁ½ÐòÁи÷×ÔÆðʼµãÖ®ºÍ£¬Ê±¼ä¼ä¸ôΪ´ø¿íµ¹Êý£¬Ê±¼ä¿í¶ÈΪƵÂʼä¸ôµ¹Êý
translates approximately as:
Distance compression, the starting point of the time after the inverse Fourier change is the sum of the respective starting points of the two sequences, the time interval is the reciprocal of the bandwidth, and the time width is the reciprocal of the frequency interval
sac(:,i)=srd(:,i).*Ha.';%·½Î»Ñ¹Ëõ
translates approximately as:
Azimuth compression
figure(1);imagesc(abs(s0.'));xlabel('¾àÀëÏò');ylabel('·½Î»Ïò')
translates approximately as xlabel Distance and ylabel Orientation

More Answers (1)

John D'Errico
John D'Errico on 24 Feb 2019
A mess of undocumented code that does something we are not given a clue to the purpose? That is almost impossible to decipher, and hardly worth your time or that of anyone else.
Two comments in the entire mess? One of them is the word "figure". And amazingly, that is just before a figure is created. Actually, 4 figures. Now that is one of the most amazingly well documented codes I have ever seen. And the other comment is the three letter acronym "RDA". Wow. Also truly helpful.
/sarcasm off
If you found this piece of crapola code because you think it will help you in some mystifiable way, then great. Use it. You would be far better off if you dump this mess into the bit bucket, then just write what you need from scratch. You will understand the result. It will be something you could trust, and debug if necessary, maintaining it, improving it when needed.
Undocumented, unverifiable code from an untrusted source is worth exactly what you paid for it - nothing at all. Worse, it will cost you money (well in terms of your own time) because you will never be able to trust it unless you could write the code from scartch yourself. And in that case, then you would have been better off investing that time to just write it from scratch. SCRAP IT.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!