Created
April 9, 2019 00:36
-
-
Save johnnyferreiradev/85356fb7420377c6af73dd9b6a515362 to your computer and use it in GitHub Desktop.
Processamento Digital de Audio 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear all; | |
close all; | |
clc; | |
[Y,fs]=audioread('sine1.wav'); | |
figure(1), port(Y); | |
Yd = fft(Y); | |
X_mag = abs(Yd); | |
N = length(Y); | |
Fbin = 0:1:N-1; | |
figure(2), plot((fs/N).*Fbin, X_mag/(N/2)) | |
xlim([0 fs/2]) | |
set(gca, 'FontSize', 16) | |
xlabel('$f(Hz)$', 'Interpreter', 'LaTex', 'FontSize', 18); | |
ylabel('$|X(\omega)|$', 'Interpreter', 'LaTex', 'FontSize', 18); | |
sound(Y, fs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment