Search All of the Math Forum:

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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

 Messages: [ Previous | Next ]
 Skirt Zhang Posts: 7 Registered: 6/6/11
shuffle without enough memory
Posted: Dec 22, 2011 9:48 AM

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,

Date Subject Author
12/22/11 Skirt Zhang
12/24/11 Roger Stafford
12/25/11 Q Zhang
12/26/11 Skirt Zhang
11/9/12 Skirt Zhang
11/11/12 Roger Stafford
11/12/12 Q Zhang
11/12/12 Roger Stafford
11/12/12 Q Zhang