call a function with the namefunction in a variable

조회 수: 10 (최근 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])

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by