How to resolve this simple formula in Matlab?

This is sum of combinations. There is function nchoosek to get number of combinations (n,k).
nchoosek(k+m, i) will find this for an i. But how to find for all ranges of i?
So, the only way to resolve this, is to write loop? Or I can do it inline – with matlab functions?
If the sum goes from
0tom+k, then the answer is2^(m+k), no iteration required. If the sum is from1tom+k, then the answer is2^(m+k)-1.If you’re insistent, then the
forloop looks like this:The function
nchoosekcan take a vector as the first argument, but not as the second.