makeChange(amount,d​enomination)

Versione 1.0.0.0 (3,56 KB) da Toby
Determines combinations of integers (denominations) which sum to a specified integer amount
58 download
Aggiornato 29 apr 2016

Visualizza la licenza

Works recursively to determine the number of combinations (and optionally the combinations themselves) of sets of specified integers (denominations) that can be formed to sum to the input amount.
example:
To determine the number of possible ways to make change for a dollar using pennies, nickels, dimes, and quarters; one would call:
[nCombinations, combinations] = makeChange(100,[1,5,10,25]);

Cita come

Toby (2024). makeChange(amount,denomination) (https://www.mathworks.com/matlabcentral/fileexchange/56834-makechange-amount-denomination), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2015b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Data Type Conversion in Help Center e MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0