<< Timeseries/Table Timeseries/Table detectImportOptions >>

Scilab Help >> Planilhas > Timeseries/Table > cell2table

cell2table

convert a cell into a table

Syntax

t = cell2table(c)
t = cell2table(c, Name, Value)

Arguments

c

cell matrix, the elements of c can be heterogeneous type.

Type allowed: double, boolean, string, datetime, duration.

Name, Value

Name: 'VariableNames', Value: vector of strings: the variable name of each column of t. The variable names must be unique and their number must be equal to size(m, 2). Default value: ["Var1", ..., "VarN"].

Name: 'RowNames', Value: vector of string: the row names for t. The names must be unique and their number must be equal to size(m, 1). Default value: [].

t

table object

Description

cell2table converts a cell into a table. t has the same size of c. Each column of c becomes a variable in t. c{:,i} must be the same type.

Like table function, you can specify the variable and row names thanks to optional parameters.

Examples

t = cell2table(m)

c = {1, hours(1), "a"; 2, hours(2), "b"; 3, hours(3), "c"}
t = cell2table(c)

t = cell2table(m, "VariableNames", ["Var1", ..., "VarN"])

c = {1, hours(1), "a"; 2, hours(2), "b"; 3, hours(3), "c"}
t = cell2table(c, "VariableNames", ["data", "duration", "info"])

See also

History

VersionDescription
2024.0.0 Introduction in Scilab.

Report an issue
<< Timeseries/Table Timeseries/Table detectImportOptions >>