Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: shuffle without enough memory
Replies: 8   Last Post: Nov 12, 2012 12:34 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Skirt Zhang

Posts: 7
Registered: 6/6/11
shuffle without enough memory
Posted: Dec 22, 2011 9:48 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear All,



I have used this shuffle function for my problem:

I need to form 10^9 combinations by randomly select three from 1000 integers (1.....1000 refers to the firm identity). After finding the combinations, I refer to single firms' return and calculate the product of the three and get one value, I call it "Prod". So I should have 10^9 "Prod"s. Finally I need to calculate the median value for all these Prods.

Thanks to Jan Simon,
http://www.mathworks.com/matlabcentral/fileexchange/27076-shuffle
Using shuffle, I manage to do this. However, the memory in my PC can only allow me to have 10^7 combinations, and the result is not good given the limit of nr of the memory.

Can anyone suggest me a good way to find the median value from the 10^7 prods?

Instead of telling me to change the computer for larger space?

Thanks a lot in advance and wish u all a nice holiday,



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.