how i can have dimension input of a defined function like f ?
1 次查看(过去 30 天)
显示 更早的评论
i have a code that input of its a handle function like f, in duration of this code i need to number of input this function for example f is: f=@(x,y)(x+y)
0 个评论
采纳的回答
Azzi Abdelmalek
2015-7-1
编辑:Azzi Abdelmalek
2015-7-1
f=@(x,y)(x+y)
s=func2str(f);
a=regexp(s,'(?<=@\()[\w,]+(?=\))','match')
out=numel(cell2mat(regexp(a,'\w+')))
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!