数据类型标识
确定变量的数据类型
MATLAB® 有许多函数可识别变量的数据类型或确定变量是否具有特定的数据类型。当调用或编写的代码依赖于具有特定数据类型的变量时,应使用这些函数。
函数
主题
- MATLAB 基础类
您可以在 MATLAB 中使用许多不同的数据类型或类。您可以构建浮点和整数数据、字符和字符串以及逻辑
true
和false
值等构成的矩阵与数组。函数句柄可将您的代码与任何 MATLAB 函数连接在一起,而与当前范围无关。表、时间表、结构体和元胞数组提供了一种将不同类型的数据存储在同一容器中的方法。 - Use is* Functions to Detect State
There are many functions in MATLAB that detect if an input has a specified data type or a specified state, or if the elements of an input array meet a specified condition.
- Working with Objects in MATLAB
Some MATLAB functions return objects. Objects combine data with functions and methods.