0
0
Simulinkdata~10 mins

Spectrum analyzer block in Simulink - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the Spectrum Analyzer block's sample rate.

Simulink
spectrumAnalyzer.SampleRate = [1];
Drag options to blanks, or click blank then click option'
A1000
B0
C44100
D-1
Attempts:
3 left
💡 Hint
Common Mistakes
Setting sample rate to zero or negative values causes errors.
2fill in blank
medium

Complete the code to set the Spectrum Analyzer block's FFT length.

Simulink
spectrumAnalyzer.FFTLength = [1];
Drag options to blanks, or click blank then click option'
A-256
B512
C0
D100
Attempts:
3 left
💡 Hint
Common Mistakes
Using non-power-of-two or negative FFT lengths causes errors.
3fill in blank
hard

Fix the error in setting the Spectrum Analyzer block's window type.

Simulink
spectrumAnalyzer.Window = '[1]';
Drag options to blanks, or click blank then click option'
AHanning
BRectangular
CBlackman
DHamming
Attempts:
3 left
💡 Hint
Common Mistakes
Misspelling window names or using incorrect casing.
4fill in blank
hard

Fill both blanks to create a spectrum analyzer object and set its sample rate.

Simulink
spectrumAnalyzer = dsp.SpectrumAnalyzer();
spectrumAnalyzer.[1] = [2];
Drag options to blanks, or click blank then click option'
ASampleRate
BFFTLength
C44100
D512
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing FFTLength with SampleRate or using wrong values.
5fill in blank
hard

Fill all three blanks to configure the spectrum analyzer's FFT length, window, and sample rate.

Simulink
spectrumAnalyzer.[1] = [2];
spectrumAnalyzer.Window = '[3]';
Drag options to blanks, or click blank then click option'
AFFTLength
B512
CHamming
DSampleRate
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing property names or using incorrect window strings.