Rank: 5158 based on 2 downloads (last 30 days) and 1 file submitted
photo

Furlan

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Furlan
Updated   File Tags Downloads
(last 30 days)
Comments Rating
09 Feb 2010 Generation of random number given the pmf n=rand_gen(x,pmf,N) Generates a random signal n oh length N from a desird pmf. Author: Furlan random signals genera... 2 5
  • 1.0
1.0 | 1 rating
Comments and Ratings by Furlan View all
Updated File Comments Rating
09 Feb 2010 Generation of random number given the pmf n=rand_gen(x,pmf,N) Generates a random signal n oh length N from a desird pmf. Author: Furlan

Yes the check 'sum(pmf)==1' causes problem.
To avoid the unexpected error, I eliminated the check In the new submitted version.
Thank you for your suggestions.

08 Feb 2010 Generation of random number given the pmf n=rand_gen(x,pmf,N) Generates a random signal n oh length N from a desird pmf. Author: Furlan

I submitted a new version whit the help comments and
a vectorial engine.
Brg
Ivan

Comments and Ratings on Furlan's Files View all
Updated File Comment by Comments Rating
09 Feb 2010 Generation of random number given the pmf n=rand_gen(x,pmf,N) Generates a random signal n oh length N from a desird pmf. Author: Furlan Furlan

Yes the check 'sum(pmf)==1' causes problem.
To avoid the unexpected error, I eliminated the check In the new submitted version.
Thank you for your suggestions.

09 Feb 2010 Generation of random number given the pmf n=rand_gen(x,pmf,N) Generates a random signal n oh length N from a desird pmf. Author: Furlan Jos (10584)

The help is certainly an improvement! You could add an H1 line to assist users of LOOKFOR.

However, floating point issues are not dealt with properly : rand_gen(x,[.1 .2 .3 .3 .1],N) returns an unexpected error .

And, as Michael Chen already pointed out, there are many alternatives on the FEX, including my own:
http://www.mathworks.com/matlabcentral/fileexchange/8891

09 Feb 2010 Generation of random number given the pmf n=rand_gen(x,pmf,N) Generates a random signal n oh length N from a desird pmf. Author: Furlan Chen, Michael

please see
http://www.mathworks.com/matlabcentral/fileexchange/25481-discrete-multinomial-distribution-sampler
which is simpler and faster.

08 Feb 2010 Generation of random number given the pmf n=rand_gen(x,pmf,N) Generates a random signal n oh length N from a desird pmf. Author: Furlan Furlan

I submitted a new version whit the help comments and
a vectorial engine.
Brg
Ivan

08 Feb 2010 Generation of random number given the pmf n=rand_gen(x,pmf,N) Generates a random signal n oh length N from a desird pmf. Author: Furlan Jos (10584)

The lack of any help, comments, % symbol what so ever and the unvectorized engine makes this is poor submission. Finally, this functionality is already available here on the File Exchange.

Top Tags Applied by Furlan
random signals generation
Files Tagged by Furlan
Updated   File Tags Downloads
(last 30 days)
Comments Rating
09 Feb 2010 Generation of random number given the pmf n=rand_gen(x,pmf,N) Generates a random signal n oh length N from a desird pmf. Author: Furlan random signals genera... 2 5
  • 1.0
1.0 | 1 rating

Contact us at files@mathworks.com