MATLAB Answers

madhan ravi
0

Is there a possibility to use varargin()?

Asked by madhan ravi
on 25 Aug 2019 at 5:38
Latest activity Commented on by madhan ravi
on 27 Aug 2019 at 17:28
Is there any other way to perform such operation?
c = {rand,rand(4)};
z = @(...) mean(...);
z(c{:})
The same can be achieved using cellfun(), but is it possible only through anonymous function?

  14 Comments

madhan ravi
on 25 Aug 2019 at 23:24
Thank you for the reply sir Walter. Perhaps I should have simply asked by reprasing it as, is there any upsides of using varargin in an anonymous function? I have seen some answerers use varargin in an anonymous function which gave an advantage but cannot find any specific examples at the moment.
Walter Roberson
on 25 Aug 2019 at 23:58
Using varargin in an anonymous function is okay.
madhan ravi
on 27 Aug 2019 at 17:28
Thank you, sir Walter :)

Sign in to comment.

Tags

Products


Release

R2018b

0 Answers