Stirling(n,r)
Version 1.0.0.0 (342 Bytes) by
Vikash Sehwag
Partition of n distinct objects in r non-empty groups
This function calculates the total no. of partitions of n distinct object in r groups such that each group as at least one element. This number is also called 'Stirling numbers of the second kind'.
Input:
n -no. of objects
r - no. of partitions
output: no. of permutations
Ex>> Stirling(10,3)=9330;
Cite As
Vikash Sehwag (2026). Stirling(n,r) (https://www.mathworks.com/matlabcentral/fileexchange/57785-stirling-n-r), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2016a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- AI and Statistics > Statistics and Machine Learning Toolbox > Descriptive Statistics and Visualization >
Find more on Descriptive Statistics and Visualization in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
