Code Analyzer returns this message when an assignment sets the indicated variable in a script, but it appears the script does not use the assigned value. This is not a problem if the caller of the script uses the assigned value.
Programmers use scripts for many different purposes in MATLAB. Some scripts are standalone programs, such as demos. Because unused assignments might indicate programming errors in standalone programs, it is appropriate to enable this message for these scripts.
Programmers use other scripts to initialize variables, and the whole purpose of such scripts is to assign values that their caller uses. For these scripts, there is no problem—the message is inappropriate.
This message is disabled by default, but you can enable it to check standalone scripts.
Enable this message to see what type of messages Code Analyzer generates for your scripts.
If most of your scripts are standalone scripts, you might want to enable this message in the preferences panel. Then, disable this message on a file-by-file basis, as described in Adjust Code Analyzer Message Indicators and Messages, for those scripts whose whole purpose is to initialize variables.
If all of your scripts are for initializing variables, keep this message disabled in the preferences panel.