error when call fun.

1 visualización (últimos 30 días)
huda nawaf
huda nawaf el 19 de Dic. de 2011
hi, I have this function: function [swarm]=initSwarm(N, N_PAR)
swarm = zeros(N,N_PAR);
for i = 1: N
for j = 1: N_PAR
swarm(i,j) = rand(1,1)%* ( V_MAX(j)-V_MIN(j) ) + V_MIN(j);
end
end
when call it:
x=initSwarm(5,5);
I get this error, I don't know why?
??? Undefined function or method 'initSwarm' for input arguments of type 'double'.

Respuesta aceptada

Aurelien Queffurust
Aurelien Queffurust el 19 de Dic. de 2011
Just add initSwarm.m in your MATLAB path and it will work.

Más respuestas (1)

Grzegorz Knor
Grzegorz Knor el 19 de Dic. de 2011

Categorías

Más información sobre Just for fun 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