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.

cummulative distribution function plz help

Status
Not open for further replies.

meto

Junior Member level 1
Joined
Apr 9, 2006
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,399
cummulative distribution

I wanna write a script with using matlab, which calculates the cummulative distribution function of the given input but i don't have any idea about this.I know that there is prepared function in matlab (cdf) but I have to write because this is homework.Thanks
 

matlab cummulative distribution function

meto said:
I wanna write a script with using matlab, which calculates the cummulative distribution function of the given input but i don't have any idea about this.I know that there is prepared function in matlab (cdf) but I have to write because this is homework.Thanks

Consider you generate gaussian random variables x and want to find cdf;

This is the script;

x=randn(10000,1); % generate 10000 gaussian samples

%find maxm of and minimum of x

P=max(x)-min(x);

L=min(x):p/1000:max(x);

y=hist(x,L) % generate histogram;

z=cumsum(y); % cdf

plot(L,z);

that's it

Added after 1 minutes:

Typo

Consider you generate gaussian random variables x and want to find cdf;

This is the script;

x=randn(10000,1); % generate 10000 gaussian samples

%find maxm of and minimum of x

P=max(x)-min(x);


L=min(x):(P/1000):max(x);

y=hist(x,L) % generate histogram;

z=cumsum(y); % cdf

plot(L,z);

that's it
 

cumsum matlab cumulative distribution function

Tthank a lot janath
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top