e.g. I calculate 4 combinations(i.e.nCr(10,1)=10,nCr(10,2)=45,(10,3)=120,(10,4)=210 using for loop).Can I get these four answers as four entries of a matrix?

The command I used is  >> n=10;

                                       >> for k=1:4

                                            nchoosek(n,k)

                                            end  (which gives above four answers)

How to get these answers as a matrix of four entries?(1st answer as 1st entry, 2nd answer as second entry of the matrix and others accordingly).So that we can further work with that matrix

More Shakeel Ahmed Khan's questions See All
Similar questions and discussions