All Permutations of integers with sum criteria

All Pernutations of integers with sum criteria
Updated 1 Aug 2020

View License

This function provides all combinations of integer vector that must verify a criteria on the sum.

Supported criteria is
sum(v) == L1
sum(v) <= L1
sum(v) < L1

Cite As

Bruno Luong (2024). All Permutations of integers with sum criteria (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP3
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Polynomials in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Fix BUG for AllVL1(1,1) that returns incorrect result

+ non-recursive engine

Correct a bug when the number of solutions is inquired

Possibility to get the number of permutations to check feasibility

Add H1 line as suggested by John D'Errico