call a function with the namefunction in a variable

1 次查看(过去 30 天)
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])

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by