1.5

1.5 | 2 ratings Rate this file 7 Downloads (last 30 days) File Size: 1.83 KB File ID: #8030

Stirling numbers of the first kind

by Steven Huang

 

14 Jul 2005 (Updated 15 Jul 2005)

This c-mex function obtains the Stirling numbers of the first kind.

| Watch this File

File Information
Description

The Stirling numbers of the first kind are defined as the coefficients of powers of x in the polynomials:

Q(x)=(x-1)(x-2)...(x-n). For example,

Q0(x)=1;
Q1(x)=x-1; %
Q2(x)=(x-1)(x-2)=x^2-3x+2;
Q3(x)=(x-1)(x-2)(x-3)=x^3-6x^2+11x-6;
...

This function calculate n>=2 case(n=0 and 1 are trivial case).

To use:
a = mStirling(4)
returns
a = 1 -10 35 -50 24

the coefficients are listed in ascending order of x.

MATLAB release MATLAB 6.5 (R13)
Other requirements VC6++
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
02 May 2006 Björn Andersson

The numbers calculated doesn't seem to be correct, at least not for n=100.

23 Dec 2010 Andrew  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
stirling number Steven Huang 22 Oct 2008 07:53:06
cmex function Steven Huang 22 Oct 2008 07:53:06
coefficients Steven Huang 22 Oct 2008 07:53:06
polynomials Steven Huang 22 Oct 2008 07:53:06

Contact us at files@mathworks.com