Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



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/27076shuffle 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,



