Complete the code to add an FFT block to the Simulink model.
add_block('dspsigops/FFT', '[1]');
The FFT block should be added with a unique path like 'myModel/FFT' to the Simulink model.
Complete the code to set the FFT block's input port to the signal named 'inputSignal'.
add_line('myModel/[1]', 'myModel/FFT/1');
The FFT block input should be set to the signal named 'inputSignal' to analyze that signal.
Fix the error in the code to correctly run the FFT analysis simulation.
simOut = sim('[1]');
The 'sim' function requires the model name without file extension to run the simulation.
Fill both blanks to extract the FFT magnitude and frequency from the simulation output.
fftData = simOut.[1]; frequencies = simOut.[2];
The simulation output contains 'fftMag' for magnitude and 'freq' for frequency data.
Fill all three blanks to plot the FFT magnitude versus frequency with labels.
plot([1], [2]); xlabel('[3]');
Plot frequency on x-axis and FFT magnitude on y-axis, labeling x-axis as 'Frequency (Hz)'.