How can i save the time for calculating a combination (nchossek(1:10000,2)) ?thank you
Mostrar comentarios más antiguos
How can i save the time for calculating a combination (nchoosek(1:10000,2)) ?thank you
6 comentarios
Guillaume
el 6 de Oct. de 2014
That's around 5e9 (5000 million!) different combinations! No matter what you do, it's going to take a while to compute.
Matt J
el 6 de Oct. de 2014
And will require 40GB to store, assuming single floating point.
pengcheng
el 6 de Oct. de 2014
Guillaume
el 6 de Oct. de 2014
It's still 49e6 (49 million) combinations. You may want to rethink what you are doing (or be prepared to wait).
Note to check how many combinations that is:
nchoosek(10000, 2) %this value on the other is very fast to calculate
Respuestas (0)
Categorías
Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!