MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Betriebsanweisung Seite 250

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 274
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 249
B Error and Warning Messages
B-6
Error: File: filename Line: # Column: # The PERSISTENT declaration must precede any use of
the variable variablename.
In the text of the function, there is a reference to the
variable before the
persistent declaration.
Error: File: filename Line: # Column: # The single colon operator (:) can only be used within an
array index expression.
You can only use the : operator by itself as an array
index. For example:
A(:) = 5; is okay, but y = :; is not.
Error: File: filename Line: # Column: # The variable variablename was mentioned more than
once as an input.
The argument list has a repeated variable. For example:
function y = myfun(x, x) % Incorrect
Error: File: filename Line: # Column: # The variable variablename was mentioned more than
once as an output.
The return value vector has a repeated variable. For example:
function [x, x] = myfun(y) % Incorrect
Error: File: filename Line: # Column: # This statement is incomplete. Variable arguments cannot
be made global or persistent.
The variables varargin and varargout are not like
other variables. They cannot be declared either global or persistent. For
example:
global varargin % Incorrect
Error: File: filename Line: # Column: # Variable argument (varargin) must be last in input
argument list.
The function call must specify the required arguments first
followed by
varargin. For example:
function [out1, out2] = example1(a, b, varargin)% Correct
function [out1, out2] = example1(a, varargin, b)% Incorrect
Error: File: filename Line: # Column: # Variable argument (varargout) must be last in output
argument list.
The function call must specify the required arguments first
followed by
varargout. For example:
function [i, j, varargout]= ex2(x1, y1, x2, y2, val)% Correct
function [i, varargout, j]= ex2(x1, y1, x2, y2, val)% Incorrect
Error: File: filename Line: # Column: # variablename has been declared both as GLOBAL and
PERSISTENT.
Declare variables as either global or persistent.
Seitenansicht 249
1 2 ... 245 246 247 248 249 250 251 252 253 254 255 ... 273 274

Kommentare zu diesen Handbüchern

Keine Kommentare