Getting error "Output argument "varargout{2}" (and maybe others) not assigned during call to "MyClass/subsref"."
Ältere Kommentare anzeigen
I am getting this error "Output argument "varargout{2}" (and maybe others) not assigned during call to "MyClass/subsref"."
A couple of things: subsref is overloaded for MyClass. varargout should return a 1x1 cell. varargout{1} is assigned appropriately just before the function return. The function call works when called from the Command Window but not when called from another higher level class. This code works on another computer with the Matlab 2015a but not on my computer with Matlab 2016a.
I have no idea what else to do. I really need this code to work on this computer. Could it be a compiler error or am I missing something? Thank you!
5 Kommentare
Geoff Hayes
am 14 Sep. 2016
Kristofer - you may need to post a subset of the code (which generates the error) so that we can try and reproduce and understand the problem.
Kristofer Womack
am 14 Sep. 2016
Walter Roberson
am 14 Sep. 2016
How are you calling it from the command window? The default for the command window (and using the expression form in general) for nargout to be automatically set to 1, to generate a single output. You would need to be using assignment form with multiple outputs for nargout to be set to beyond 1.
Kristofer Womack
am 14 Sep. 2016
Kristofer Womack
am 15 Sep. 2016
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Entering Commands finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!