S.tack data from multiple variables into single variable
converts the table or timetable,S.
= stack(你
那vars.
)你
那into an equivalent table or timetable,S.
那that is stacked. The栈
function stacks up multiple variables from你
那specified byvars.
那into a single variable inS.
。In general,S.
包含更少的变量,但更多的行,而不是你
。
输出参数,S.
,包含一个新的分类变量,以指示哪个变量你
每一行中的堆叠数据来自。栈
replicates data from the variables in你
that are not stacked.
如果你
is a table, then you cannot stack row names.
如果你
is a timetable, then you cannot stack row times.
You can specify more than one group of data variables in你
那and each group becomes a stacked data variable inS.
。你se a cell array to contain multiple values forvars.
,以及字符向量或字符串阵列的单元阵列,用于包含多个值'NewDataVariableName'
名称值对参数。所有组必须包含相同数量的变量。