MATLAB: Function nchoosek (v,k) very large vector gives Inf

mathematics

I have a column vector 510 X 1 ( listOfRmsValues) and I want to find all possible combinations taken 30 elements( sampleSize ) at a time . Using nchoose(v,k) gives Inf as v should not be more than 15 as suggested by Matlab as it exceeds the maximum limit Matlab can handle.I even tried using vpi as suggested in other matlab forums but I get an error
Error using vpi/nchoosek (line 46)
n must be scalar, integer >= 1
This is my code snippet
function [ meanVal , stdDev , binomialCoefficient ] = MeanDistribution ( listOfRmsValues ,quantity ,sampleSize )
tic
binomialCoefficient = nchoosek( vpi(quantity) ,sampleSize);
allPossibleCombinations = nchoosek (vpi(listOfRmsValues) , sampleSize); % I get the error oIn this line.
sampleMean = zeros ( binomialCoefficient , 1 );
sampleStdDeviation = zeros ( binomialCoefficient , 1 );
Is vpi not built to handle vectors? If not how can I solve this problem.
I know the number is very huge.Further more,I want to take mean of all combinations too .Can anyone suggest me a solution.
Thank you

Best Answer

If your computer was able to produce 10^9 entries per second (about 3 clock cycles on your processor), then then 2664780071347123896227890686628472969646736772415 results would take over 8.4 * 10^31 years and would require about 1.6 * 10^38 terabytes to store.
When did you say the deadline was for this task?