Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.1.0 - Русский


cell2table

convert a cell into a table

Syntax

t = cell2table(c)
t = cell2table(c, OptionName, Value, ...)

Arguments

c

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

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

t

table object

Optional pairs OptionName, Value are:

"VariableNames", 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"].

"RowNames", vector of strings

the row names for t. The names must be unique and their number must be equal to size(m, 1). Default value: [].

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, "VariableNames" and "RowNames" can be specified.

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

  • table — create a table from variables
  • table2cell — convert a table into a cell

History

ВерсияОписание
2024.0.0 Introduction in Scilab.
Report an issue
<< addvars Timeseries/Table combinations >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu May 22 12:55:32 CEST 2025