MATLAB help yFs audioreadchirpwav Reads the sound file soun
MATLAB help.
[y,Fs] = audioread(\'chirp.wav\'); %Reads the sound file
sound(y,Fs); %Plays sound file
fs = 8192; %Sample frequency
%Generates a row vector of t = time
t = linspace(0,length(y)/fs,length(y));
%Plots
figure
subplot(3,1,1)
plot(t,y)
title(\'Sound Signal\')
xlabel(\'Time(s)\')
--> this is as far as i have gone which is the sample recorded signal with time, and im stuck, please help.
This is How the next two plots should display.
Background: Fourier transform, Double side spectra, Nyquist frequency, Signal Analyzer (part-1) An audio file (chirp.wav) is given. The sampling frequency used to record this audio signal was 8192 Hz. 1. Read the file in MATLAB. 2. Play the file 3. Plot the signal with respect to time (Use proper labels). Recorded Signal 0.5 0.5 0.2 0.4 0.6 0.8 1.2 1.4 1.6 1.8 time (seconds)Solution
matlab code:
load(\'chirp.wav\');
sound(y,8192);
plot(y);
X=fft(y,3001);
X1= fftshift(X);
f = -3*pi:pi/500:3*pi
plot(f,abs(X1));
xlabel(\'w\');
ylabel(\'abs(X(jw)\')
![MATLAB help. [y,Fs] = audioread(\'chirp.wav\'); %Reads the sound file sound(y,Fs); %Plays sound file fs = 8192; %Sample frequency %Generates a row vector of t = MATLAB help. [y,Fs] = audioread(\'chirp.wav\'); %Reads the sound file sound(y,Fs); %Plays sound file fs = 8192; %Sample frequency %Generates a row vector of t =](/WebImages/31/matlab-help-yfs-audioreadchirpwav-reads-the-sound-file-soun-1088321-1761572620-0.webp)