Matlab的判别和转换函数

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Matlab的判别和转换函数

ISCHAR True for character array (string).

ISCHAR(S) returns 1 if S is a character array and 0 otherwise.

ISNUMERIC True for numeric arrays.

ISNUMERIC(A) returns 1 if A is a numeric array and 0 otherwise.

For example, sparse arrays, and double precision arrays are

numeric while strings, cell arrays, and structure arrays are not.

ISLOGICAL True for logical array.

ISLOGICAL(X) returns 1 if X is a logical array and 0 otherwise.

Logical arrays must be used to perform logical 0-1 indexing.

ISNAN True for Not-a-Number.

ISNAN(X) returns an array that contains 1's where

the elements of X are NaN's and 0's where they are not.

For example, ISNAN([pi NaN Inf -Inf]) is [0 1 0 0].

ISEMPTY True for empty matrix.

ISEMPTY(X) returns 1 if X is an empty array and 0 otherwise. An empty array has no elements, that is prod(size(X))==0.

ISINF True for infinite elements.

ISINF(X) returns an array that contains 1's where the

elements of X are +Inf or -Inf and 0's where they are not.

For example, ISINF([pi NaN Inf -Inf]) is [0 0 1 1].

ISFINITE True for finite elements.

ISFINITE(X) returns an array that contains 1's where

the elements of X are finite and 0's where they are not.

For example, ISFINITE([pi NaN Inf -Inf]) is [1 0 0 0].

For any X, exactly one of ISFINITE(X), ISINF(X), or ISNAN(X) is 1 for each element.

ISOBJECT True for MATLAB objects.

ISOBJECT(A) returns 1 if A is a MATLAB object and 0 otherwise.

ISSTRUCT True for structures.

ISSTRUCT(S) returns 1 if S is a structure and 0 otherwise.

ISCELL True for cell array.

ISCELL(C) returns 1 if C is a cell array and 0 otherwise.

ISJA V A True for Java object arrays

ISJA V A(J) returns 1 if J is a Java object array, and 0 otherwise.

ISFIELD True if field is in structure array.

F = ISFIELD(S,'field') returns true if 'field' is the name of a field

in the structure array S.

ISSPARSE True for sparse matrix.

ISSPARSE(S) is 1 if the storage class of S is sparse

and 0 otherwise.

DOUBLE Convert to double precision.

DOUBLE(X) returns the double precision value for X.

If X is already a double precision array, DOUBLE has

no effect.

DOUBLE is called for the expressions in FOR, IF, and WHILE loops

if the expression isn't already double precision. DOUBLE should

be overloaded for all objects where it makes sense to convert it

into a double precision value.

INT2STR Convert integer to string.

S = INT2STR(X) rounds the elements of the matrix X to

integers and converts the result into a string matrix.

NUM2STR Convert number to string.

T = NUM2STR(X) converts the matrix X into a string representation T with about 4 digits and an exponent if required. This is useful for labeling plots with the TITLE, XLABEL, YLABEL, and TEXT commands.

T = NUM2STR(X,N) converts the matrix X into a string representation with a maximum N digits of precision. The default number of digits is based on the

相关文档
最新文档