Octave's numel function accepts extra arguments:
[...] For example,
A = 1;
B = ones (2, 3);
numel (A, B)
will return 6, as this is the number of ways to index with B. Or
the index could be the string ":" which represents the colon
operator. For example,
A = ones (5, 3);
numel (A, 2, ":")
will return 3 as the second row has three column entries [...]
Does Matlab still accept this usage? It does not appear to be
Both examples still work in R2018b with the same results (the second example with ':' single quotes).
The documentation is not really clear about how numel is used today, but in the context with classes the ML docs clearly suggest to use "numArgumentsFromSubscript", even if a numel-method is present:
"If classes implement a numArgumentsFromSubscript method, MATLAB calls it instead of numel to determine the number of elements returned by indexed expressions that return comma-separated lists." .