Calling some MATLAB function with suppressed outputs
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Marko Gulin
am 11 Mai 2015
Beantwortet: Marko Gulin
am 11 Mai 2015
Hello all!
Let's say that we want to call some user-defined MATLAB function as:
[x, ~, y] = my_function(inputs);
where second output of the function is suppressed. Is there any way for function my_function to know which outputs are suppressed?
Best, Marko.
0 Kommentare
Akzeptierte Antwort
Alfonso Nieto-Castanon
am 11 Mai 2015
Depending on what you need that functionality for you might achieve a similar result using variable number of outputs and checking the number of outputs requested by the caller (see varargout and nargout) and/or using additional input arguments specifying which particular combination of outputs you would like to have...
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!