请教feval函数的用法
想在一个函数例程中运行另一个函数,
out = main_fun('another_function',x)
请问如何让main_fun内部执行
another_function(another_variable)?
我在main_fun中用
y=feval(@funk,another_variable);
在matlab6.1下出现错误Undefined function 'funk'.
在matlab2008下出现错误:
"funk" was previously used as a variable,
conflicting with its use here as the name of a function or command.
See MATLAB Programming, "How MATLAB Recognizes Function Calls That Use Command Syntax" for details.
请问该如何修改语句y=feval(@funk,another_variable);?
先谢了!
|