help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does anybody have Octave code to draw Rayleigh fading envelope?


From: Illidan Modeler
Subject: Re: Does anybody have Octave code to draw Rayleigh fading envelope?
Date: Thu, 2 Oct 2008 20:58:59 +0800

Thank you for your advice. I tried to post the whole paper to the
list, but was rejected for big file size. I've uploaded it to the
following URL:
http://sites.google.com/site/illidanmodeler/Home/radio-channel/computergeneratedmultipathfadingsimulation.pdf?attredirects=0


Below is the listing of code, could anyone help me translate it into Octave :

RETURNS 200 RAYLEIGH'FADED ELEMENTS (IN DB1) AT 5 MSEC INTERVALS
DIKENSION X(200),Z(200),F(100)
PI.3.14159265
Do 17 I-l,200;X(I)=0.;17 Z(I)=O.
IR=ITIMEZ(O)
N=200;IM=FD
T-I -1;P=SQRT(l.-(T/PD)'.2)
DO 20 1=2,IH
20 F(I)=l./SQRT(P)
IMM=IM+1;P=PLOAT(2.*IM-1);P=FLOAT(IM-1)/SQRT(P)
ARRAY P CONTAINS THE FIL!I'EH FACTORS
P=FU)AT(IM)*(PI/2.-ATAEI(P));F(IMPI)=SQRT(P)
Do 30 I=2,IMM
30 X(I)=F(I)*RNORMS(IR) w 40 I=2 I"
RNORMS IS A RANDOM NUMBER GENERATOR WITH GAUSSIAN DISTRIBUTION
CALL FFTRAN(N.X.Y)
~~~~~ ~
40 Y(I)=-;(I)*RNOFXS(IR)
CALL FACTR(N)' ' ~ .
FFTRAN AND FACTR ARE FAST FOURIER TRANSFORM ROUTINES
Do 50 I=1,200
W 60 1=2.I"
50 Y(I)=O
60 Y(I)=P~I)*RNORMS(IR)
DO 70 I=2,IMM
70 Z(I)=-P(I)*RNORMS(IR)
CALL PFTRAN(N,Y,Z)
CALL FACTR(N)
s=o.
TWO INDEPENDENT AND FILTERED NOISE SOURCES
QUADRATURE
Do 80 I=1,200
X(I)=X(I)**2+Y(I)**2
s=s/200
80 S=S+X(I)
Q=lO./ALOG(lO.)
DO 90 I=1,200
OUTPUT IS THE ARRAY X CONTAINING 200 LEVEL
90 X(I)=Q*AMG(X(I)/S)
NORMALIZED TO A 0 dB MEAN).
RETURN
END

On Thu, Oct 2, 2008 at 2:45 PM, Francesco Potorti` <address@hidden> wrote:
>>There are a number of papers and scripts that deal with BER-SNR curve.
>>But I need to compute amplitude-time curve, as given in a paper by J.
>>I. Smith in 1975, with the title "a computer generated multipath
>>fading simulation".
>
> Ah, probably is a method for synthetic generation of a time trace of
> fading.  I know there are some methods, but I have not the details.
>
>>This paper even gives listing of source code. But it's not
>>Matlab/Octave code (seems like Fortran that I don't read).
>
> If it's short, you can try to post it here, and maybe someone will be so
> kind to translate it into Octave.
>
> --
> Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
> ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
> via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
> (entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/
>



--
Northern Capital, the Republic of Pandaria
http://illidan.cublog.cn



-- 
Northern Capital, the Republic of Pandaria
http://illidan.cublog.cn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]