Path: news.mathworks.com!not-for-mail
From: "Chen Sagiv" <chensagivron@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: time and frequency domain
Date: Sat, 10 May 2008 19:58:02 +0000 (UTC)
Organization: Image Processing &#38; Math More
Lines: 48
Message-ID: <g04uoa$2fb$1@fred.mathworks.com>
References: <g03rl9$2pf$1@fred.mathworks.com> <g03tua$bpi$1@fred.mathworks.com> <g04ipq$nbi$1@fred.mathworks.com>
Reply-To: "Chen Sagiv" <chensagivron@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210449482 2539 172.30.248.35 (10 May 2008 19:58:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 10 May 2008 19:58:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 805005
Xref: news.mathworks.com comp.soft-sys.matlab:467727


Hi,

It is not important when you plot the abs of the FT, but 
shouldn't you use instead:

> f1 = zeros(1,512);
> f1(128:383) = hamming(256);
> 
> f2 = zeros(1,512);
> f2(128:383) = 1;
> 
> fft_f1 = fftshift(fft(ifftshift(f1),2048));
> fft_f2 = fftshift(fft(ifftshift(f2),2048));
> 
> subplot(2,2,3); plot(f1);
> subplot(2,2,1); plot(f2);
> subplot(2,2,4); plot(abs(fft_f1)); xlim([896 1151])
> subplot(2,2,2); plot(abs(fft_f2)); xlim([896 1151])


Best,

Chen
"jay vaughan" <jvaughan5.nospam@gmail.com> wrote in message 
<g04ipq$nbi$1@fred.mathworks.com>...
> "Lars " <mustermann.klaus.TO.REMOVE@gmx.de> wrote in 
message
> <g03tua$bpi$1@fred.mathworks.com>...
> > I don't have the chzech-toolbox installed. Sorry!
> 
> Try this.
> 
> f1 = zeros(1,512);
> f1(128:383) = hamming(256);
> 
> f2 = zeros(1,512);
> f2(128:383) = 1;
> 
> fft_f1 = fftshift(fft(f1,2048));
> fft_f2 = fftshift(fft(f2,2048));
> 
> subplot(2,2,3); plot(f1);
> subplot(2,2,1); plot(f2);
> subplot(2,2,4); plot(abs(fft_f1)); xlim([896 1151])
> subplot(2,2,2); plot(abs(fft_f2)); xlim([896 1151])
> 
> J