call a function with the namefunction in a variable

1 回表示 (過去 30 日間)
marilia15
marilia15 2012 年 4 月 10 日
I can't find how to do it. I have the name of a function in a variable:
  • a='namefunction';
I want to call the function doing something like:
  • call(a, parameters)
Is it possible? Thanks

採用された回答

Andrei Bobrov
Andrei Bobrov 2012 年 4 月 10 日
doc feval
doc eval
eg
a = 'size';
[s1 s2] = feval(a,[1 2 3])
  1 件のコメント
marilia15
marilia15 2012 年 4 月 10 日
sorry for the easy question :)
thanks a lot

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by