help generate chirp signal
4 views (last 30 days)
Show older comments
hi, i want to generate a chirp signal with frequency going from 10Khz to 100Khz. Currently i am using the following code to generate chirp where frequency goes from 100 to 500hz. But as you can see the graph, the plot is not a continuous plot, i want a continuous up chirp. also, if i change the values f1, f2 in the code below the output is not correct.
code:
Fs=1000;
tf=2;
t=0:1/Fs:tf-1/Fs;
f1=100;
f2=400;
semi_t=0:1/Fs:(tf/2-1/Fs);
sl=2*(f2-f1/2);
f1=f1*semi_t+(sl.*semi_t/2);
f2=f1(end)+f2*semi_t-sl.*semi_t/2;
f=[f1 f2];
y=1.33*cos(2*pi*f.*t);
plot(t,y)
0 Comments
Answers (0)
See Also
Categories
Find more on Waveform Generation 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!