Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Generation of uniformly distributed random variable(Matlab)

Status
Not open for further replies.

was29e

Junior Member level 2
Joined
Mar 10, 2005
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
amman-jordan
Activity points
1,549
needed help in MATLAB

hi everyone...

if anyone have an idea about this please help
its a matlab progect and im a begginer in matlab... :oops:
how can i do this: generation of a uniformly distributed random variable using matlab...

if anyone have an idea, or anything that can help in this i would be gratefyll...
thanx everyone[/quote]
 

Re: needed help in MATLAB

Wat exactly do u mean by a Uniformly distributed Random Variable ???
Do you mean that it shud give u random values in a range but does not repeat a value untill all the values in that range have been given ???

Or do u mean that it has a normal distribution around a mean value ??? (Statistically speaking) ????
 

needed help in MATLAB

Random variable??

Try typing "doc rand" or "help rand" and see if that's what you want.
If not, then follow the "see also" links at the bottom.
Or click Help -> MATLAB Help -> Search and search for the word "random".

Happy MATLABing!
 

Re: needed help in MATLAB

see, random variables are already inbuilt in matlab. there are many which u could check out viz rand randn randsrc randint.....

but if u want to design ur own code, then go for these books for literature...

Numerical Receipes in C,

/http://www.library.cornell.edu/nr/bookcpdf.html

crcpress.Numerical Library in C for Scientists and Engineers



if u feel any difficulty, feel free to reply. or pm me.

/cedance
 

Re: needed help in MATLAB

rand() in matlab generates the uniformly distributed random numbers. But if you need highly uniformly distributed random numbers, this funciton may be not good enough. Neither the rand function in c library. You need special algorithm to generate it.
 

Re: needed help in MATLAB

hi ive been so busey doing exams and stuff, now im free to do this project thing, of course i still know nothing about matlab , so please if any one can tell me what i should do with this, i will be greatfull ok..
the algorithem that i have to follow is like this:
the approach used in this project to generate a sequence of random numbers involves the use of the power residue method, which is a recursive formula that can be implemented easily and quickley, the recursive will be used to generate a pseudorandom sequence with numbers between 0 and M, afterwards the sequence will be divided by M to get a sequence of random numbers belonging to a uniformly ditributed random variable between 0 and 1,
the general form of the recursive formula is given by:
Z(k)=(αZ(k-1))modM (1.1) (k is subscript)
where α a carefully chosen integer between 1 and M , and M is a prime number or an integer power of a prime number. equation (1.1) involves taking the product of α and Z(k-1) , dividing it by M , and letting Z(k) be the reminder of the division . the resulting number is in the range 0 to M-1.
the statitical properites of the sequence generated by recursive formulas of the type of eqn.(1.1) have been studid extensively. only few sequences have been identified with good statistical properteis. the following parameters are recomended for the power method:
Z(k)=(7^5 Z(k-1)) mod (2^31 -1) (1.2)

TASK 1:
write a MATLAB program that will generate a sequence of random numbers with length 10^4 using the recursive formula in (1.2). choose different values for Z(0) , which is the seed of the random number generator, and it determine the point at which the sequence is begun.

TASK 2:
verfiy that the sequence is uniformly ditributed by two ways:
1: choose the odd indexed numbers in the sequence and plot them versus the even indexed numbers in the sequence, comment in the resulting two dimensional pattern.
2: group the sequence numbers in three equal sized groups by choosing numbers in one by one form the sequence and plot them versus each other in three dimensions, comment on the resulting three dimensional pattern.




will thats it , all that i have to do, i was told that it should be easy , but i dont know how to begin with it, so if anyone have an idea please tell me ok

thank u all..
 

Re: needed help in MATLAB

try this link h**p://www.hait.ac.il/staff/commEng/Uri_Mahlab/simindigialcomm2.ppt
 

Re: needed help in MATLAB

I'd like to learn that how I could obtain white noise by matlab ?
Is white noise uniformly dsitrubited data ?
 

Re: needed help in MATLAB

If you are using Matlab 6.5 or higher"notr you must be using the full version"

1)Open Matlab
2) Press start button
3)Toolboxes==>statistics
4)Help
5)Probability distribution
 

Re: needed help in MATLAB

I suggest to read the mastering matlab series. it is a good one
 

Re: needed help in MATLAB

try the function: rand()
you can lookup in The Matlab Command muster
 

needed help in MATLAB

anyone have an idea on the VLSI system design with the matlab
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top