The code does not appear to use the assignment to the indicated variable. This situation occurs when any of the following are true:
The specified argument value contains a typographical error, causing it to appear unused.
The code does not use all values returned by a function call.
The function requires a specific number of output arguments to execute the wanted behavior.
If the message displays because of a typographical error, fix the error.
If the code must ignore some output argument values, use the tilde operator
(~
) to replace the unused argument. This tilde operator
eliminates unused argument names from your program, and clarifies your intent to
ignore the returned values. MATLAB introduced the tilde operator in R2009b;
therefore, use it only when running version R2009b or later.
If the message is unwarranted, suppress it, as described in Adjust Code Analyzer Message Indicators and Messages. Consider including a comment in your code explaining the reason for this suppression. For more information, see “Ignoring Selected Outputs or Input Arguments”.