timetable

Methods

Method Reference: timetable.splitapply

timetable: Y = splitapply (func, tt, G)
timetable: [Y1, …] = splitapply (func, tt, G)

Apply a function to each group of rows of a timetable.

Y = splitapply (func, tt, G) splits the rows of tt into the groups the numbers in G name, calls func once per group with one argument per variable holding that group’s rows, and stacks the results. G holds one number per row of tt, as findgroups returns; a row numbered NaN belongs to no group and is left out.

The row times take no part: func receives the variables alone.

[Y1, …] = splitapply (…) asks func for as many outputs as are requested and stacks each of them.

See also: findgroups, timetable

Source Code: timetable