Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Fold Amplitude Spectrum
Date: Mon, 1 Dec 2008 16:19:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <gh12pl$rpf$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228148341 28463 172.30.248.37 (1 Dec 2008 16:19:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 1 Dec 2008 16:19:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 892175
Xref: news.mathworks.com comp.soft-sys.matlab:504137


Hi does anyone know how to fold the amplitude spectrum below. There is a line of symmetry at about 4800 on my spectrum and I need the values on the right of this line to be on the negative x axis. I believe this is called folding the amplitude spectrum.

Any help much appreciated.

[s,fs,M]=wavread('dogbark.wav');

N=length(s)
T=1/fs;
y=fft(s);
X=y/N;
P=N*T;
f0=1/P;
Nf=N/2+1;
freq=[0:f0:(N-1)*f0];

stem(abs(Ax))
title('Amplitude Spectrum of Dogbark.wav')
xlabel('Frequency (Hz)')
ylabel('Amplitude')