Lab3_2.docx

  • Uploaded by: Aedrian M Lopez
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Lab3_2.docx as PDF for free.

More details

  • Words: 170
  • Pages: 6
n=0:300 fs = 10; ts=0.005 tn=n*ts x1=2*cos (20*pi*tn); x2=-2/3*cos (20*pi*tn*3); x3=2/5*cos (20*pi*tn*5); x4=-2/7*cos (20*pi*tn*7); x5=2/9*cos (20*pi*tn*9); x6=-2/11*cos (20*pi*tn*11); x7=2/13*cos (20*pi*tn*13); x8=-2/15*cos (20*pi*tn*15); x9=2/17*cos (20*pi*tn*17); x10=-2/19*cos (20*pi*tn*19); xt=x1+x2+x3+x4+x5+x6+x7+x8+x9+x10; subplot (2,2,1); plot (tn,xt); title ('x(total)'); subplot (2,2,3); n = length(xt); X=fft (xt); xf=fftshift(X) xamp=abs(xf); fshift1 = (-n/2:n/2-1)*(fs/n); powershift1 = abs(xf); plot(fshift1,powershift1,'c'); title ('AMPLITUDE SPECTRUM OF x(total)'); subplot (2,2,2); grid on; N=2*randn(1,n); xN=xt+N; plot(xN); grid on; title ('x(total) WITH NOISE'); subplot (2,2,4); n1 = length(xN); X1=fft (xN); Xf=fftshift (X1); Xamp=abs(Xf); fshift2=(-n1/2:n1/2-1)*(fs/n1); powershift2 = abs(Xf); plot(fshift2,powershift2,'c'); title ('AMPLITUDE SPECTRUM OF xT WITH NOISE');

[y,fs]=audioread ('Ah.wav'); L1=length (y); L=y(:,1); R=y(:,2); subplot (3,1,1) plot (L,'c'); title ('LEFT SIDE of VOICE SIGNAL'); subplot (3,1,2); plot (R,'c'); title ('RIGHT SIDE of VOICE SIGNAL'); subplot (3,1,3); NFFT = 2^nextpow2(L1); X=fft (y,NFFT)/L1; f = fs/2*linspace(0,1,NFFT/2+1); plot(f,2*abs(X(1:NFFT/2+1)),'m'); title ('SINGLE-SIDED AMPLITUDE SPECTRUM OF THE VOICE SIGNAL');

BATAAN PENINSULA STATE UNIVERSITY COLLEGE OF ENGINEERING AND ARCHITECTURE DEPARTMENT OF ELECTRONICS ENGINEERING

ESSP-411 Experiment No. 3 COMPUTATIONS OF TRANSFORM October 8, 2018

NAME: AEDRIAN M. LOPEZ BSECE IV-A Monday, 7AM-10AM

Score

ENGR. RODRIGO MUĂ‘OZ Instructor

More Documents from "Aedrian M Lopez"