Anonymous user
Undefined values: Difference between revisions
Undefined values in Matlab and Octave
(→{{header|Common Lisp}}: Discuss local rebinding.) |
(Undefined values in Matlab and Octave) |
||
Line 541:
Sin[a]
-> Undefined </lang>
=={{header|Matlab}} / {{header|Octave}}==
If a variable is generated without defing a value, e.g. with
<lang Matlab> global var; </lang>
the variable is empty, and can be tested with
<lang Matlab> isempty(var) </lang>
For numerical values (e.g. vectors or arrays) with a predefined size, often not-a-numbers (NaN's) user used to indicate missing values,
<lang Matlab> var = [1, 2, NaN, 0/0, inf-inf, 5] </lang>
These can be tested with:
<lang Matlab> isnan(var) </lang>
<pre>
ans =
0 0 1 1 1 0
</pre>
=={{header|MUMPS}}==
|