How to call This function

5 visualizaciones (últimos 30 días)
aadhil basha
aadhil basha el 22 de Sept. de 2013
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 comentario
aadhil basha
aadhil basha el 22 de Sept. de 2013
how to call this fucntion

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 22 de Sept. de 2013
Sample call:
prob = struct('n_var', 7);
trial_solution = knapsack_generate_random(prob);
  1 comentario
aadhil basha
aadhil basha el 22 de Sept. de 2013
its working :) do u mind if i ask some doubts?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB Coder en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by