MATLAB Application Program Interface Reference Help Desk

mxIsNumeric

Purpose

True if mxArray is numeric or a string

C Syntax

Arguments

array_ptr

Pointer to an mxArray.

Returns

True if the array's storage type is

Returns False if the array's storage type is

Description

Call mxIsNumeric to determine if the specified array contains numeric data. If the specified array is a cell or a structure, then mxIsNumeric returns False. Otherwise, mxIsNumeric returns True.

Call mxGetClassID to determine the exact storage type.

Note that mxIsNumeric behaves somewhat differently in MATLAB 5 than in MATLAB 4. MATLAB 4 distinguished between string data and numeric data; therefore, the MATLAB 4 mxIsNumeric returned false if the specified array held string data. By contrast, the MATLAB 5 mxIsNumeric does not distinguish between string data and numeric data; MATLAB 5 typically stores strings inside an array having one of the integer types. Therefore, the MATLAB 5 mxIsNumeric returns True if the specified array contains a string.

See Also

mxGetClassID



[ Previous | Help Desk | Next ]