timetable.unstack
timetable: tt2 = unstack (tt, vars, ivar)
timetable: tt2 = unstack (tt, vars, ivar, Name, Value)
timetable: [tt2, index] = unstack (…)
Spread one variable of a timetable across several.
tt2 = unstack (tt, vars, ivar) replaces
the variable named in vars with one variable per distinct value
of the indicator variable ivar, each holding the values that
carried that indicator. Rows sharing a group become one row.
The row times group: with no 'GroupingVariables' given, one row
comes back per distinct row time, so tt2 is a timetable carrying
those times. A group that has no value for an indicator is filled with
a missing value.
[tt2, index] = unstack (…) also returns
index, naming a row of tt in each group.
The following Name/Value pairs are accepted:
'GroupingVariables''ConstantVariables''NewDataVariableNames''AggregationFunction''VariableNamingRule''modify' (the default) makes each new name a valid identifier;
'preserve' keeps it as it is.Source Code: timetable