how i can have dimension input of a defined function like f ?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
xosro
am 1 Jul. 2015
Beantwortet: Walter Roberson
am 2 Jul. 2015
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 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 1 Jul. 2015
Bearbeitet: Azzi Abdelmalek
am 1 Jul. 2015
f=@(x,y)(x+y)
s=func2str(f);
a=regexp(s,'(?<=@\()[\w,]+(?=\))','match')
out=numel(cell2mat(regexp(a,'\w+')))
Weitere Antworten (1)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!