[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NCHOOSEK function
From: |
Diego Ruiz Moreno |
Subject: |
NCHOOSEK function |
Date: |
Wed, 3 Mar 2004 08:28:25 -0800 |
Hi,
Is there a equivalent to the NCHOOSEK matlab function in OCTAVE ?
Here is the matlab description of the function (The interesting
functionallity
if the second one)
NCHOOSEK Binomial coefficient or all combinations.
NCHOOSEK(N,K) where N and K are non-negative integers returns
N!/K!(N-K)!.
This is the number of combinations of N things taken K at a time. When
a
coefficient is greater than 10^15, a warning will be produced
indicating
possible inexact results. In such cases, the result is good to 15
digits.
NCHOOSEK(V,K) where V is a vector of length N, produces a matrix
with N!/K!(N-K)! rows and K columns. Each row of the result has K
of the
elements in the vector V. This syntax is only practical for
situations where
N is less than about 15.
Thanks
D.
------------------------------------------------------------
http://Game.37.com/ <--- Free Games
http://newJoke.com/ <--- J O K E S ! ! !
- NCHOOSEK function,
Diego Ruiz Moreno <=