Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 201480

Submitted on 7 Feb 2013 by Claudio Gelmi

Correct

39Size
Leading solution size is 24.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
accu=10^6;
f = 10000; fs=48000; your_chirp=round(chirping(f,fs)*accu)/accu;
y_correct = round(chirp(0:1/fs:1-1/fs, 0,1,f,'linear',-90)*accu)/accu;
assert(isequal(your_chirp,y_correct))

                    
2
Pass
 
%%
accu=10^6;
f = 3650; fs=44000; your_chirp=round(chirping(f,fs)*accu)/accu;
y_correct = round(chirp(0:1/fs:1-1/fs, 0,1,f,'linear',-90)*accu)/accu;
assert(isequal(your_chirp,y_correct))