www.pudn.com > RadarSignals.rar > steplfm.m
% steplfm - stepped train of LFM pulses
% creates stepped-LFM signal for use with ambiguity function plotting
% programs
tpdf=input(' T*Df (typ. = 0 or 5) = ? ');
tpb=input(' T*B (typ. = 0 or 12.5) = ? ');
trovertp=input('Tr/T (typ. = 4) (Using 1 implies contiguous pulses) = ? ');
nn=input(' Number of pulses (integer, typ. = 3, 4, 8 or 16) = ? ');
mm=50;
mm2=mm/2-1;
ufm=ones(1,mm);
ddf=tpb/mm^2;
ffm=ddf*(-mm2:mm2+1)-ddf/2;
mtr=(trovertp-1)*mm;
space1=zeros(1,mtr);
u_step1=[ufm space1];
f_step1=[ffm space1];
f1=-(nn-1)/2;
u_step=u_step1;
f_step=f_step1;
f_add=[f1*u_step1];
reverse=input(' Alternating slopes (yes=1, no=0) = ? ');
if reverse==1
rv=-1;
else
rv=1;
end
cost=input('Linear (=0) or Costas (=1) steps = ? ');
if cost ==1;
if nn==16
qq=[6 14 2 3 10 8 11 15 9 1 13 12 5 7 4] ;
elseif nn==8
qq=[7 2 5 1 6 4 3];
elseif nn==4
qq=[2 3 1];
elseif nn==3
qq=[2 1];
end
end
if cost==0 % linear steps
qq=[1:nn-1];
end
for q= qq
u_step=[u_step u_step1];
f_step=[f_step (rv)^q*f_step1];
f_add=[f_add (f1+q)*u_step1];
end
f_total=f_step+(tpdf/mm)*f_add;
disp('')
disp(' In ambfn1 ')
disp(' use "u_step" as Signal elements and "f_total" as Frequency coding')
disp(' ')
disp(' In ambfn7 ')
disp(' use "u_amp = u_step;" and "f_basic = f_total;" ')
disp(' ')