Question
hello i don't want to use chirp inbuilt function and i have written a code for chirp. could any one tell me is the code is correct ? i have simulate it and getting plot but at instantaneous time t1, I am not getting frequency change. i have written a code according to equation of chirp signal generation. please tell me this is correct ? ***************************************** f1 =10; f2 = 50 ; t =0:0.001:20; t1 = 10; alpha = (f2-f1)/t1; f= (alpha)*t + f1; xx =1*cos(f); plot (t,xx); **********************************************
Expert Answer
Kshitij Singh
PhD Expert
Answered Aug 14, 2026
hi, try this :
Fs=1000; % sample rate tf=2; % 2 seconds t=0:1/Fs:tf-1/Fs; f1=100; f2=400; % start @ 100 Hz, go up to 400Hz 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)
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related chirp Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →