Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
matlab help

Subject: matlab help

From: xp_64@hotmail.com

Date: 11 May, 2013 12:30:44

Message: 1 of 13

can you please help me in this Q


Verification of the central limit theorem
Use Matlab to verify the central limit theorem for the sum of N independent and identically distributed Rayleigh RVs (with a=0 and different values of b) for N=5, 10 and 20. Comment on the fit to the approximate Gaussian pdf for different values of b and N. Show the curve plots of the pdfs

thank you

Subject: matlab help

From: Paddy O'Furniture

Date: 11 May, 2013 23:38:00

Message: 2 of 13

On Sat, 11 May 2013 05:30:44 -0700, xp_64 babbled incessantly about:

> can you please help me in this Q
>
>
> Verification of the central limit theorem Use Matlab to verify the
> central limit theorem for the sum of N independent and identically
> distributed Rayleigh RVs (with a=0 and different values of b) for N=5,
> 10 and 20. Comment on the fit to the approximate Gaussian pdf for
> different values of b and N. Show the curve plots of the pdf’s

Certainly.... what you should do is use Matlab to verify the central limit theorem for the sum of N independent and
identically distributed Rayleigh RVs (with a=0 and different values of b) for N=5, 10 and 20. Next, comment on the fit
to the approximate Gaussian pdf for different values of b and N. Lastly, show the curve plots of the PDFs.

> thank you

no charge.

Subject: matlab help

From: reza

Date: 13 May, 2013 03:14:14

Message: 3 of 13

On Saturday, May 11, 2013 8:30:44 AM UTC-4, xp...@hotmail.com wrote:
> can you please help me in this Q
>
>
>
>
>
> Verification of the central limit theorem
>
> Use Matlab to verify the central limit theorem for the sum of N independent and identically distributed Rayleigh RVs (with a=0 and different values of b) for N=5, 10 and 20. Comment on the fit to the approximate Gaussian pdf for different values of b and N. Show the curve plots of the pdfs
>
>
>
> thank you

help raylrnd

may be useful

Subject: matlab help

From: xp_64@hotmail.com

Date: 14 May, 2013 10:15:22

Message: 4 of 13

more explanation please
 

Subject: matlab help

From: Nasser M. Abbasi

Date: 14 May, 2013 10:29:38

Message: 5 of 13

On 5/14/2013 5:15 AM, xp_64@hotmail.com wrote:
> more explanation please
>
>

Here is an applet

http://demonstrations.wolfram.com/TheCentralLimitTheorem/

You can run it now in your browser, using a free plugin
if you do not have it. (link to plugin is on the page above).

The code is about 5 lines only. You should be able to easily translate it
to Matlab from Mathematica as it uses functions that are
in Matlab also. (hist, rand, pdf, sqrt, seed, plot). This uses
the normal distributation. So in your case, you need to use
Rayleigh instead, i.e. raylpdf

So, it looks like you have everything you need?

--Nasser

Subject: matlab help

From: Barry Williams

Date: 14 May, 2013 13:55:13

Message: 6 of 13

"Nasser M. Abbasi" wrote in message <kmt3mh$kc4$1@speranza.aioe.org>...
> On 5/14/2013 5:15 AM, xp_64@hotmail.com wrote:
> > more explanation please
> >
> >
>
> Here is an applet
>
> http://demonstrations.wolfram.com/TheCentralLimitTheorem/
>
> You can run it now in your browser, using a free plugin
> if you do not have it. (link to plugin is on the page above).
>
> The code is about 5 lines only. You should be able to easily translate it
> to Matlab from Mathematica as it uses functions that are
> in Matlab also. (hist, rand, pdf, sqrt, seed, plot). This uses
> the normal distributation. So in your case, you need to use
> Rayleigh instead, i.e. raylpdf
>
> So, it looks like you have everything you need?
>
> --Nasser
>
>

Do you get partial credit for his homework problem Nasser?
Barry

Subject: matlab help

From: Barry Williams

Date: 14 May, 2013 13:56:27

Message: 7 of 13

"Nasser M. Abbasi" wrote in message <kmt3mh$kc4$1@speranza.aioe.org>...
> On 5/14/2013 5:15 AM, xp_64@hotmail.com wrote:
> > more explanation please
> >
> >
>
> Here is an applet
>
> http://demonstrations.wolfram.com/TheCentralLimitTheorem/
>
> You can run it now in your browser, using a free plugin
> if you do not have it. (link to plugin is on the page above).
>
> The code is about 5 lines only. You should be able to easily translate it
> to Matlab from Mathematica as it uses functions that are
> in Matlab also. (hist, rand, pdf, sqrt, seed, plot). This uses
> the normal distributation. So in your case, you need to use
> Rayleigh instead, i.e. raylpdf
>
> So, it looks like you have everything you need?
>
> --Nasser
>
>

Do you get partial credit for his homework problem Nasser?
Barry

Subject: matlab help

From: xp_64@hotmail.com

Date: 14 May, 2013 17:11:32

Message: 8 of 13



Nasser

How do u convert it a matlab code?

Subject: matlab help

From: Nasser M. Abbasi

Date: 14 May, 2013 17:46:28

Message: 9 of 13

On 5/14/2013 12:11 PM, xp_64@hotmail.com wrote:
>
>
> Nasser
>
> How do u convert it a matlab code?
>

By hand. The code is trivial:

---------------
SeedRandom[seed]

Histogram[ Table[Mean[RandomReal[{0, 100}, n]], {200}], {35, 65, 1}],

Plot[200*PDF[NormalDistribution[50, Sqrt[9999/(12 n)]], x], {x, 35,65}]
----------------------

You can look at each and guess what the matlab equivalent is.

n above is sample size, and seed is, well seed for the random number
generator.

Table just makes a vector of length 200, each is mean of a
random number between 0 and 100. And Histogram is hist(), Plot
is plot, and PDF is your pdf. It uses normal dist. you need to change
it to yours.

I am sure if you try, you'll be able to translate it. Google the
command for more help.

If you can't do it, will post the matlab equiv. later if I have time.

good luck,
--Nasser

Subject: matlab help

From: xp_64@hotmail.com

Date: 14 May, 2013 18:04:32

Message: 10 of 13

بتاريخ الثلاثاء، 14 مايو، 2013 UTC+3 8:46:28 م، كتب Nasser M. Abbasi:
> On 5/14/2013 12:11 PM, xp_64@hotmail.com wrote:
>
> >
>
> >
>
> > Nasser
>
> >
>
> > How do u convert it a matlab code?
>
> >
>
>
>
> By hand. The code is trivial:
>
>
>
> ---------------
>
> SeedRandom[seed]
>
>
>
> Histogram[ Table[Mean[RandomReal[{0, 100}, n]], {200}], {35, 65, 1}],
>
>
>
> Plot[200*PDF[NormalDistribution[50, Sqrt[9999/(12 n)]], x], {x, 35,65}]
>
> ----------------------
>
>
>
> You can look at each and guess what the matlab equivalent is.
>
>
>
> n above is sample size, and seed is, well seed for the random number
>
> generator.
>
>
>
> Table just makes a vector of length 200, each is mean of a
>
> random number between 0 and 100. And Histogram is hist(), Plot
>
> is plot, and PDF is your pdf. It uses normal dist. you need to change
>
> it to yours.
>
>
>
> I am sure if you try, you'll be able to translate it. Google the
>
> command for more help.
>
>
>
> If you can't do it, will post the matlab equiv. later if I have time.
>
>
>
> good luck,
>
> --Nasser



can please send the code because the dead line tomorrow

Subject: matlab help

From: Bruce Bowler

Date: 14 May, 2013 18:32:18

Message: 11 of 13

On Tue, 14 May 2013 11:04:32 -0700, xp_64 wrote:

> can please send the code because the dead line tomorrow

If you can't do the homework, have you learned anything in the class?

(since you can't do the homework, they obviously haven't taught you well.
I'd ask for my tuition money back, if I were you - Tongue firmly planted
in cheek).

Ask your professor for help.

Subject: matlab help

From: xp_64@hotmail.com

Date: 14 May, 2013 18:53:50

Message: 12 of 13

بتاريخ الثلاثاء، 14 مايو، 2013 UTC+3 9:32:18 م، كتب Bruce Bowler:
> On Tue, 14 May 2013 11:04:32 -0700, xp_64 wrote:
>
>
>
> > can please send the code because the dead line tomorrow
>
>
>
> If you can't do the homework, have you learned anything in the class?
>
>
>
> (since you can't do the homework, they obviously haven't taught you well.
>
> I'd ask for my tuition money back, if I were you - Tongue firmly planted
>
> in cheek).
>
>
>
> Ask your professor for help.

Actually, i'm taking electrical course involves some mat-lab homework but they never gave us mat-lab class related to this material.

Subject: matlab help

From: Nasser M. Abbasi

Date: 14 May, 2013 21:55:53

Message: 13 of 13

On 5/14/2013 1:53 PM, xp_64@hotmail.com wrote:

> Actually, i'm taking electrical course involves some mat-lab homework
>but they never gave us mat-lab class related to this material.
>

You really need to do a little bit of work yourself. Even a little
bit of searching?

Here are some in matlab. Just change the pdf is all what you have to do

http://www.gaussianwaves.com/2010/01/central-limit-theorem-2/
http://www.mathworks.com/matlabcentral/fileexchange/39385-central-limit-theorem
http://www.mathworks.com/matlabcentral/fileexchange/30254-illustration-of-the-central-limit-theorem
http://www.mathworks.com/help/dsp/ug/visualize-central-limit-theorem-in-array-plot.html
http://www.mathworks.com/matlabcentral/newsreader/view_thread/39686

And this is all on the first half of the first page of google search. So, just
look at these, and modify the pdf. They all follow the same main logic:

http://en.wikipedia.org/wiki/Central_limit_theorem

"the mean of a sufficiently large number of independent random
variables, each with a well-defined mean and well-defined variance,
will be approximately normally distributed"


--Nasser

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us