Complete the code to read an audio file into MATLAB.
[y, Fs] = audioread([1]);The audioread function requires the filename as a string, including quotes.
Complete the code to play the audio stored in variable y with sampling rate Fs.
sound([1], Fs);The sound function plays the audio data stored in y at the sampling rate Fs.
Fix the error in the code to compute the duration of the audio signal y sampled at Fs.
duration = length([1]) / Fs;The length function should be applied to the audio data y to get the number of samples.
Fill both blanks to create a vector of time values for the audio signal y sampled at Fs.
t = (0:[1]) / [2];
The time vector is generated as sample indices from 0 to length(y)-1 divided by the sampling rate Fs.
Fill all three blanks to create a new audio signal y_filtered by applying a simple moving average filter of length N.
N = 5; filter = ones(1, [1]) / [2]; y_filtered = conv([3], filter, 'same');
The filter length is N, the divisor is N to normalize the moving average, and the convolution is applied to the audio data y.
