Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - Français


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

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

History

VersionDescription
2024.0.0 Introduction in Scilab.
Report an issue
<< Timeseries/Table Timeseries/Table detectImportOptions >>

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 Oct 24 11:16:04 CEST 2024