How to call This function

6 ビュー (過去 30 日間)
aadhil basha
aadhil basha 2013 年 9 月 22 日
function [ solution ] = knapsack_generate_random( problem, ~ ) %KNAPSACK_INITIALIZE_RANDOM generates a solution for the problem
solution = randi(2,1,problem.n_var)-1;
end
  1 件のコメント
aadhil basha
aadhil basha 2013 年 9 月 22 日
how to call this fucntion

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2013 年 9 月 22 日
Sample call:
prob = struct('n_var', 7);
trial_solution = knapsack_generate_random(prob);
  1 件のコメント
aadhil basha
aadhil basha 2013 年 9 月 22 日
its working :) do u mind if i ask some doubts?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by