function feval

조회 수: 7 (최근 30일)
Krishnendu Mukherjee
Krishnendu Mukherjee 2012년 1월 27일
??? 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
TAB
TAB 2012년 1월 27일
>> doc feval
Walter Roberson
Walter Roberson 2012년 1월 27일
We need the context.

댓글을 달려면 로그인하십시오.

채택된 답변

Honglei Chen
Honglei Chen 2012년 1월 27일
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)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler SDK에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by