How to call This function

조회 수: 4 (최근 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 CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by