??? 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 件のコメント

Krishnendu Mukherjee
Krishnendu Mukherjee 2012 年 1 月 27 日
for what purpose this function is used?
what is the syntex of the function?
is it supported for matlab7
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 日

0 投票

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 件)

カテゴリ

ヘルプ センター および File Exchange で Programming についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by