Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!usenet.stanford.edu!postnews.google.com!m3g2000pri.googlegroups.com!not-for-mail
From: TideMan <mulgor@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: generate Time signal from a given PSD
Date: Tue, 3 Nov 2009 10:51:51 -0800 (PST)
Organization: http://groups.google.com
Lines: 33
Message-ID: <4fa464e4-319c-4c19-8493-2d46c075cdf2@m3g2000pri.googlegroups.com>
References: <hcpgp2$7r6$1@fred.mathworks.com>
NNTP-Posting-Host: 202.78.152.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1257274311 4107 127.0.0.1 (3 Nov 2009 18:51:51 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 3 Nov 2009 18:51:51 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m3g2000pri.googlegroups.com; posting-host=202.78.152.105; 
	posting-account=qPexFwkAAABOl8VUndE6Jm-9Z5z_fSpR
User-Agent: G2/1.0
X-HTTP-Via: 1.1 bc2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) 
	Gecko/20091016 Firefox/3.5.4,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:582130


On Nov 4, 4:04 am, "Aymen " <aymenkoo...@gmail.com> wrote:
> Hello people,
>  i'm a novice in the field of signal processing and this problem maybe easy for you ...
> I want to extract a stochastic time signal from a given PSD using the inverse fourier transform.
> the PSD contains frequencies from 0 to 2557,5 and i'm trying to generate a time signal corresponding to that PSD (it goes over a time period of 35 sec ).
> I think i'm having a scaling problem but i don't know where ...
> could you please help me with this :
>
> First of all i tried to generate random phases for my PSD-amplitudes to be able to perform the ifft.
> M=[freq Amplitude];  %PSD Matrix
> a=sqrt(Amplitude);
> phase = 2*pi*rand(size(a)); %random phases in [0  2*pi]
> Y=a.*exp(j*phase);  % complex vector for ifft
>
> signal = ifft(Y,N); %inverse Fourier Transform, problem in N ??????
> t=0:35/(N-1):35; %time vector
> plot(t,real(signal)) %plot of time signal
>
> my time vector sould have 179200 values between 0 sec and 35 sec
>
> which N should i use to get the correct answer ?

Why haven't you followed the instructions I gave you here:
http://groups.google.com/group/comp.soft-sys.matlab/browse_thread/thread/daa041121df922ea/7ea8124eb997d9c3#7ea8124eb997d9c3

I told you how to build Y, but you haven't done that.
Why not?