Techniques For Debugging MATLAB M-Files (1207)
Techniques For Debugging MATLAB M-Files (1207)
Warning: One or more output arguments not assigned during call to function.
For MATLAB 6.5 (R13):
??? One or more output arguments not assigned during call to function.
Explanation:
One of the functions you have called is defined to return an output argument but that output argument does not
exist in that function when it tries to return.
Common causes:
You have misspelled the name of one of your output arguments inside your function, or you have forgotten to
assign a value to one of the output arguments of your function. Alternatively, the function was originally written
with one or more output arguments, but the section of the function that computed the output argument was
removed or modified in such a way that the output argument is now extraneous.
Solution:
Stop MATLAB on the last line of the function listed in the warning or error message. Verify that each of the
output arguments listed in the function declaration line at the beginning of the function exists after that last line is
executed (using the DBSTEP function or the Step button in the Editor). If the arguments do not, examine the
function to determine where you intended the arguments to be declared. Verify that those lines of code are
being executed and have no typographical errors.
Example demonstrating this error:
OutputNotAssigned.m
Section 44: OpenGL Not Available. Using ZBuffer.
Warning: OpenGL not available. Using ZBuffer.
Explanation:
You are attempting to display a plot that MATLAB tries to render using OpenGL, but OpenGL is not available or
Page 27 of 30 Technical Note 1207: Techniques for Debugging MATLAB M-files
5/13/2003 http://www.mathworks.com/support/tech-notes/1200/1207.shtml
is not functioning correctly on your computer. Therefore, MATLAB will use the ZBuffer renderer instead.
Common causes:
The common causes for OpenGL being unavailable or functioning incorrectly on your machine are listed in Tech
Note 1201: The Graphics Rendering and Troubleshooting Guide.
Solution:
Please see Tech Note 1201: The Graphics Rendering and Troubleshooting Guide for information on how to
correct this problem.
Example demonstrating this error:
N/A
Section 45: Subscript Indices Must Be Real Positive Integers or Logicals
For Versions of MATLAB up to MATLAB 6.1 (R12.1):
??? Index into matrix is negative or zero. See release notes on changes to
logical indices.
Warning: Subscript indices must be integer values.
For MATLAB 6.5 (R13):
What did you expect to find on this page that you want us to consider adding?
Page 29 of 30 Technical Note 1207: Techniques for Debugging MATLAB M-files
5/13/2003 http://www.mathworks.com/support/tech-notes/1200/1207.shtml
Additional Comments:
SUBMIT