MATLAB Answers

Is there a possibility to use varargin()?

2 views (last 30 days)
madhan ravi
madhan ravi on 25 Aug 2019
Commented: madhan ravi on 27 Aug 2019
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
madhan ravi on 25 Aug 2019
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
Walter Roberson on 25 Aug 2019
Using varargin in an anonymous function is okay.

Sign in to comment.

Answers (0)

Sign in to answer this question.

Tags

Products


Release

R2018b