MATLAB 表的使用和查询

    xiaoxiao2022-07-03  199

    有时候我们拿到的数据是 table 的形式,我们需要知道一些基本的方法,把 table 转换为我们熟悉的数组。

    tableName.Properties.VariableNames

    tableName为表的名称,返回一个 Cell,Cell 中为表中每个属性的名称。

    tableName.PropertyName

    PropertyName 为表中某个属性名称,如果这个属性是数字,则返回一个数组,否则返回元胞数组。

    table2array(tableName)

    返回一个数组,里面包含表中的数字数据。

    varfun(func,T)

    对表 T 中每一个元素进行 func 例如: varfun(@double,T):化为小数varfun(@mean,T):求均值

    varfun(func,T,Name,Value)

    设置一组属性值,如 ‘OutputFormat’ 指定输出格式。

    tabulate(T)

    统计信息
    最新回复(0)