0-1 Knapsack

Solves the 0-1 knapsack problem with positive integer weights.

You are now following this Submission

Uses dynamic programming to solve the problem, see for example http://en.wikipedia.org/wiki/Knapsack_problem .

Cite As

Petter (2026). 0-1 Knapsack (https://www.mathworks.com/matlabcentral/fileexchange/22783-0-1-knapsack), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.4.0.0

Updated the help description. Decreased the number of published files.

1.3.0.0

Added published demonstration file and fixed a bug

1.1.0.0

Fixed Wikipedia link

1.0.0.0