??? Error using ==> feval
Attempt to execute SCRIPT untitled2 as a function.
Error in ==> C:\Documents and Settings\krishnendu\Desktop\Chared ICA Code\ImperialistCompetitveAlgorithm_GlobalOptimizationStrategy.m
On line 83 ==> InitialCost = feval(ProblemParams.CostFuncName,InitialCountries,ProblemParams.CostFuncExtraParams);
im getting this error.

3 comentarios

Krishnendu Mukherjee
Krishnendu Mukherjee el 27 de En. de 2012
for what purpose this function is used?
what is the syntex of the function?
is it supported for matlab7
TAB
TAB el 27 de En. de 2012
>> doc feval
Walter Roberson
Walter Roberson el 27 de En. de 2012
We need the context.

Iniciar sesión para comentar.

 Respuesta aceptada

Honglei Chen
Honglei Chen el 27 de En. de 2012

0 votos

It looks like your untitled2 is a script, not a function, hence cannot be evaluated by feval. To define a function, you need to have, e.g.
function y = foo(x)
in your foo.m as the first line and then you can do
y = feval(@foo,x)

Más respuestas (0)

Categorías

Más información sobre Software Development Tools en Centro de ayuda y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by