
6 Editing and Debugging M-Files
temp = diff([data{1}(:) data{2}(:) data{3}(;)]);
Multiple messages can represent a single problem or multiple problems.
Addressing one might address all of them, or after addressing one, the
other messages m ig ht change o r what you n eed to do might becom e
clearer.
M-Lint message bar. Each marker
represents an M-Lint message.
Position the pointer at a marker to
view the message, in this example
the only error marker in the file.
There can be multiple messages for one line.
Click a marker to go to the code
fragment that resulted in the message.
In this example, the multiple messages
actually result from a single error.
b Make changes to address the problem noted in the M-Lint message—the
M-Lint indicators update automatically.
In the example, the M-Lint message suggest a d elimiter imbalance. You
can check that by moving the arrow key over each o f the delimiters
to see if MATLAB indicates a m ismatch. This requires that File >
Preferences > Keyboard > Delimiter Matching has the Match on
arrow key option selected. There are no mismatched delimiters. The
actual problem is the semicolon in parentheses,
data{3}(;), is incorrect
and should be a colon. In line 48, change
data{3}(;) to data{3}(:).
When you make the change, the underline no longer appears in line 48.
6-96
Kommentare zu diesen Handbüchern