Merge up sweep and down sweep together in the same figure to get a chirp up and down
3 views (last 30 days)
i generated up sweep and down sweep signals and i want to merge them together to get one chirp up and down like triangular pulse
the range of time which i used to generate the sweeps was t1=0:Ts:T-Ts and t2=T:Ts:2*T-Ts
after merging the sweeps i should get a chirp with time between 0:Ts:2*T-Ts
can you help me?
fs =100e3; %sampling frequency
fc=20e3; %carrier frequency
Ts=1/fs; %sampling period
R=4; %initial distance of the target in [m]
c=340; %speed of sound in air in [m/s]
t1=0:Ts:T-Ts; %time range for transmitted signal
Tx1 = 1*cos(2*pi*(fc-b/2)*t1+(pi*b*t1.^2/T));
Tx2 = 1*cos(2*pi*(fc+3*b/2)*t2-(pi*b*t2.^2/T));
David K. on 18 Jul 2019
It seems like everything you've done so far is good. To merge two matrices you can use this simple command:
chirp = [Tx1 Tx2];
To check if they cover the same time you can type out, if it is 1 then they are the same length of time.
length(chirp) == length(0:Ts:2*T-Ts)
Hope this helps.