3

Is it possible to check whether the Matlab function output argument N is disgarded by its caller (~ given in call) or not provided one of its N+K, K>1, is defined, that is when nargout > N.

For instance, given

function [x,y] = f()
    ...;
end

we would like to detect that x does not need to be calculate by f() in the call

[~,y] = f();
Nordlöw
  • 11,838
  • 10
  • 52
  • 99

1 Answers1

2

Does not seem to be possible. See this blog entry from the Matlab page in particular this comment.

Boris
  • 7,054
  • 1
  • 15
  • 13