Info
This question is closed. Reopen it to edit or answer.
two conditions on two 8*256 matrices
1 view (last 30 days)
Show older comments
Hi everyone,
i have problem about knapsack problem.
8*256 matrix A contains element representing the weigth
8*256 matrix B containg elements representing the value .
i want to get the max value with a weight constrains not excceding 28.
below line of code retund a lot value ?
indices = find((A(:,1)<capacity) & y(:,1)== max(valid_benefit_ar))
Answers (2)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!