help generate chirp signal
조회 수: 2 (최근 30일)
이전 댓글 표시
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)
![12.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/205746/12.jpeg)
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Waveform Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!