Determine if a string is numeric: Difference between revisions

Content added Content deleted
(→‎{{header|MATLAB}}: mark incorrect)
Line 750:
 
=={{header|MATLAB}}==
{{incorrect|MATLAB|Neither method is reliable for determining if a string is numeric or if it is a single number. Consider using textscan() or sscanf().}}
 
This can be done using several methods in MATLAB. One of the possible ways is given below. An important note, the strings 'i' and 'j' will be recognized as imaginary numbers, not as strings containing the letters 'i' and 'j'; furthermore function names which evaluate to numeric output (ie, 'white') will be miscategorized as numeric. Please also note the use of Matlab's '~' character, which is the NOT command in Matlab.