# doc-cache created by Octave 11.3.0
# name: cache
# type: cell
# rows: 3
# columns: 708
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
@cell/disp


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 178
datatypes: disp ( C )

Customized display of cell arrays.

This function overloads Octave core disp with respect to cell arrays
and displays their contents in MATLAB like manner.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Customized display of cell arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
@cell/display


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 184
datatypes: display ( C )

Customized display of cell arrays.

This function overloads Octave core display with respect to cell
arrays and displays their contents in MATLAB like manner.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Customized display of cell arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
NaT


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1174
datatypes: T = NaT ( n )
datatypes: T = NaT ( sz1 , &hellip;, szN )
datatypes: T = NaT ( sz )
datatypes: T = NaT (&hellip;, 'Format' , fmt )
datatypes: T = NaT (&hellip;, 'TimeZone' , tz )

“Not-a-Time”. Creates missing-valued datetime arrays.

T = NaT ( n ) creates an N&times;N datetime matrix with all
values being Not-a-Time ( NaT ). When called with no size input
values, it returns a NaT datetime scalar.

T = NaT ( sz1 , &hellip;, szN ) returns a datetime array
with NaT values sized according to the input arguments sz1 ,
&hellip;, szN . Alternatively, individual input size arguments can be
merged into a single size vector sz , as in the following syntax
T = NaT ( sz ) .

T = NaT (&hellip;, 'Format' , fmt ) returns a
datetime array of NaT values with the specified display format.

T = NaT (&hellip;, 'TimeZone' , tz ) returns a
datetime array of NaT values in the time zone specified by tz .

NaT is the datetime equivalent of NaN . It represents
a missing or invalid value. NaT values never compare equal to,
greater than, or less than any value, including other NaT s. Doing
arithmetic with a NaT and any other value results in a NaT .

See also:
datetime


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
“Not-a-Time”.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
array2table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1338
datatypes: tbl = array2table ( A )
datatypes: tbl = array2table ( A , Name , Value )

Convert an array to a table.

tbl = array2table ( A ) converts the 2-D matrix A to
the table tbl , where each column of A becomes a variable in
tbl .

A can be any type of array supported by table , including a cell
array, as long they are constraint to 2 dimensions. However, in the case of
a cell array array2table does not extract the contents of its cells,
resulting to a table with each variable being a column of cells. Use
cell2table if you want to create a table from the contents of the
cells in A .

tbl = array2table ( A , Name , Value ) specifies
optional parameters for creating the table tbl with the following
Name-Value paired arguments.

Name Value
'VariableNames' A cell array of character vectors or
a string array defining the variable names of tbl . The names must be
valid variable names and unique.
'RowNames' A cell array of character vectors or
a string array defining the row names of tbl . The names must be unique
but not necessarily valid variable names.
'DimensionNames' A cell array of character vectors or
a string array defining the dimension names of tbl . The names must be
unique and not in conflict with variable names. By default, dimension names
are 'Row', 'Variables' .

See also:
cell2table,
struct2table,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Convert an array to a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
array2timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1214
datatypes: tt = array2timetable ( A , 'RowTimes' , rowTimes )
datatypes: tt = array2timetable ( A , 'TimeStep' , dt )
datatypes: tt = array2timetable ( A , 'SampleRate' , fs )
datatypes: tt = array2timetable (&hellip;, Name , Value )

Convert an array to a timetable.

tt = array2timetable ( A , 'RowTimes' ,
rowTimes ) converts the 2-D array A to a timetable, each
column becoming a variable and rowTimes labelling the rows. The row
times must be given, by one of 'RowTimes' , 'TimeStep' or
'SampleRate' , since a timetable cannot be built without them.

Variable names are taken from the name of A with the column number
appended, so an array named data gives 'data1' ,
'data2' and so on; an unnamed array gives 'Var1' onwards.

The following Name-Value pairs are also accepted.

Name Value
'VariableNames' A cell array of character vectors or a
string array defining the variable names, one per column of A .
'DimensionNames' A two-element cell array of character
vectors or string array naming the rows and the variables. By default the
rows are named 'Time' .
'StartTime' The time of the first row, for the
'TimeStep' and 'SampleRate' forms.

See also:
table2timetable,
timetable2table,
timetable,
array2table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Convert an array to a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
caldays


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 439
datatypes: calD = caldays ( X )

Calendar duration in days.

calD = caldays ( X ) returns a calendarDuration
array representing calendar days equivalent to the values in X , which
must be a numeric array of integer values.

caldays is also available as a method for calendarDuration
arrays, in which case it performs the opposite conversion.

See also:
calendarDuration,
calyears,
calquarters,
calmonths,
calweeks,
calendarDuration.caldays


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Calendar duration in days.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
calendarDuration


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 839
datatypes: calendarDuration

Array representing durations of time using flexible-length calendar
date/time units.

Each calendarDuration element stores internally the number of whole
months, the number of whole days, and a duration object representing
hours, minutes, and seconds. It can be used to simplify calculations on
datetime arrays involving calendar units.

calendarDuration arrays can be created through their constructor by
combining numeric arrays representing individual calendar duration units or
through the functions caldays , calweeks , calmonths ,
calquarters , and calyears , which create calendar durations in
terms of a single calendar duration unit. These functions are also
available as methods of calendarDuration arrays to extract
individual calendar duration units as numeric arrays.

See also:
datetime,
duration


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 84
Array representing durations of time using flexible-length calendar date/time units.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
calendarDuration.Format


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 210
calendarDuration: property Format

Display format

Display format, specified as a character vector or string scalar. If
specified as a string scalar, it is converted and stored internally as
a character vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
Display format



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
calendarDuration.caldays


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1063
calendarDuration: X = caldays ( calD )

Calendar duration in days.

X = caldays ( calD ) returns a numeric array with the
number of days as represented in calD .

A month has no fixed number of days, so an array carrying any month at
all cannot be stated in days and is an error rather than a guess. Use
split on such an array, which reports each unit separately. The
sign plays no part: a negative number of months is refused exactly as a
positive one is.

A NaN or infinite month count is not refused. It is not known to
be non-zero, so it propagates as NaN or Inf , just as
calmonths , calquarters and calyears already report
it. MATLAB instead refuses such a span when it was built by the
constructor, while accepting the very same span built by caldays ;
two spellings of one value cannot sensibly disagree, so both are
accepted here.

caldays is also available as a function, in which case it performs
the opposite conversion.

See also:
calendarDuration.calyears,
calendarDuration.calquarters,
calendarDuration.calmonths,
calendarDuration.calweeks,
caldays


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Calendar duration in days.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
calendarDuration.calendarDuration


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3803
calendarDuration: calD = calendarDuration ( X )
calendarDuration: calD = calendarDuration ( Y , MO , D )
calendarDuration: calD = calendarDuration ( Y , MO , D , H , MI , S )
calendarDuration: calD = calendarDuration ( Y , MO , D , T )
calendarDuration: calD = calendarDuration ( calD2 )
calendarDuration: calD = calendarDuration (&hellip;, 'Format' , FMT )

Create a new array of calendar durations.

calD = calendarDuration ( X ) returns an array of
calendar durations from numeric matrix X , which must have either
three or six columns, representing years, months, days, hours, minutes,
and seconds, accordingly. All but seconds must be represented as whole
duration units by integer values.

calD = calendarDuration ( Y , MO , D ) returns
an array of calendar durations from numeric arrays Y , MO , and
D , which correspond to years, months, and days, respectively. The
size of calD is the common size of the numeric input arguments,
which must be of the same size or scalars. A scalar input functions as a
constant array of the same size as the other inputs.

calD = calendarDuration ( Y , MO , D , H ,
MI , S ) returns an array of calendar durations from numeric
arrays Y , MO , D , H , MI , and S , which
correspond to years, months, days, hours, minutes, and seconds,
respectively. The size of calD is the common size of the numeric
input arguments, which must be of the same size or scalars. A scalar
input functions as a constant array of the same size as the other inputs.

calD = calendarDuration ( Y , MO , D ,
T ) returns an array of calendar durations from numeric arrays
Y , MO , and D , which correspond to years, months, and
days, as well as a time duration array T . The size of calD
is the common size of the data input arguments, which must be of the same
size or scalars. A scalar input functions as a constant array of the
same size as the other inputs.

Numeric input arrays Y , MO , D , H , and MI
must contain integer values corresponding to whole calendar units.
S can also be contain fractions of seconds.

calD = calendarDuration ( calD2 ) returns a copy of the
calendarDuration array calD2 , which keeps its size as well as its
'Format' property unless a new format is specified.

calD = calendarDuration (&hellip;, 'Format' ,
FMT ) specifies the format in which calD is displayed.
FMT must be a character vector or a string scalar containing the
following letters.

'y' years
'q' quarters of a year
'm' months
'w' weeks
'd' days
't' time duration

Each character must be specified only once in the same order as they
appear in the above list. 'm' , 'd' , and 't'
characters must always be included in the format specification. No
other character is accepted.

Note: MATLAB does not reject a format that omits a required
character. It warns and silently substitutes a repaired format, so that
'ymd' becomes 'ymdt' . An invalid format is an error
here, because rewriting what the user asked for hides the typo that
caused it.

Note: MATLAB also accepts a numeric array in place of T ,
which it reads as a count of milliseconds , thereby exposing the
internal storage of its duration type. This is undocumented and
contradicts MATLAB&rsquo;s own documentation, which requires T to be a
duration array, and it is not reproduced here. Use milliseconds
( N ) to say so explicitly.

calD = calendarDuration () returns a scalar array of
calendar durations with a value of zero days. To create an empty
calendarDuration array, use calendarDuration ([], [], []) . A
'Format' may be given on its own, as in calendarDuration
( 'Format' , 'mdt' ) , which returns the same zero scalar
in that format. MATLAB requires data alongside the option and rejects
this.

See also:
calyears ,
calquarters ,
calmonths ,
calweeks ,
caldays ,
calendarDuration,
iscalendarduration,
datetime,
duration


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Create a new array of calendar durations.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
calendarDuration.calmonths


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 395
calendarDuration: X = calmonths ( calD )

Calendar duration in months.

X = calmonths ( calD ) returns a numeric array with the
number of months as represented in calD .

calmonths is also available as a function, in which case it
performs the opposite conversion.

See also:
calendarDuration.calyears,
calendarDuration.calquarters,
calendarDuration.calweeks,
calendarDuration.caldays,
calmonths


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Calendar duration in months.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
calendarDuration.calquarters


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 472
calendarDuration: X = calquarters ( calD )

Calendar duration in quarters.

X = calquarters ( calD ) returns a numeric array with
the number of quarters as represented in calD , rounded towards
negative infinity, so that -1 month is -1 quarter.

calquarters is also available as a function, in which case it
performs the opposite conversion.

See also:
calendarDuration.calyears,
calendarDuration.calmonths,
calendarDuration.calweeks,
calendarDuration.caldays,
calquarters


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Calendar duration in quarters.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
calendarDuration.calweeks


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 753
calendarDuration: X = calweeks ( calD )

Calendar duration in weeks.

X = calweeks ( calD ) returns a numeric array with the
number of weeks as represented in calD , rounded towards negative
infinity, so that -15 days is -3 weeks and not -2 .

As for caldays , an array carrying any month at all cannot be
stated in weeks and is an error rather than a guess, whatever the sign
of that month count. Use split on such an array. A NaN
or infinite month count propagates rather than being refused, on the
same reasoning as caldays .

calweeks is also available as a function, in which case it
performs the opposite conversion.

See also:
calendarDuration.calyears,
calendarDuration.calquarters,
calendarDuration.calmonths,
calendarDuration.caldays,
calweeks


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Calendar duration in weeks.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
calendarDuration.calyears


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 454
calendarDuration: X = calyears ( calD )

Calendar duration in years.

X = calyears ( calD ) returns a numeric array with the
number of years as represented in calD , rounded towards negative
infinity, so that -1 month is -1 year.

calyears is also available as a function, in which case it
performs the opposite conversion.

See also:
calendarDuration.calquarters,
calendarDuration.calmonths,
calendarDuration.calweeks,
calendarDuration.caldays,
calyears


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Calendar duration in years.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
calendarDuration.cat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 532
calendarDuration: C = cat ( dim , A , B , &hellip;)

Concatenate calendarDuration arrays.

C = cat ( dim , A , B , &hellip;) concatenates
calendarDuration arrays A , B , &hellip; along dimension
dim . All input arrays must have the same size except along the
operating dimension dim . Any of the input arrays may also be
string arrays or cell arrays of character vectors of compatible size.
Additionally, an input can be a numeric matrix, which when parsed to the
constructor will return a calendarDuration array of compatible size.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Concatenate calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
calendarDuration.cellstr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 693
calendarDuration: cstr = cellstr ( calD )
calendarDuration: cstr = cellstr ( calD , FMT )

Convert calendarDuration array to a cell array of character vectors.

cstr = cellstr ( calD ) returns a cellstr array of
character vectors, cstr , which has the same size as the input
calD . cstr contains the string representations of the
calendar durations in calD .

cstr = cellstr ( calD , FMT ) further specifies
the format of the returned string representations. FMT must be a
character vector conforming to the same specifications required by the
constructor&rsquo;s 'Format' property paired argument. Note that
cellstr only accepts FMT as a single argument and not as a
property paired argument.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Convert calendarDuration array to a cell array of character vectors.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
calendarDuration.char


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 561
calendarDuration: cmat = char ( calD )
calendarDuration: cmat = char ( calD , FMT )

Convert calendarDuration array to a character matrix.

cmat = char ( calD ) returns a character matrix with
one row per element in calD , taken in column-major order. The
second optional argument, FMT , can be used to specify the format of
the returned string representations of the calendarDuration input array
calD .

Rows shorter than the widest are padded on the left , so the
character matrix is right-justified, as MATLAB returns it and as the
array itself is displayed.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Convert calendarDuration array to a character matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
calendarDuration.circshift


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 783
calendarDuration: B = circshift ( A , n )
calendarDuration: B = circshift ( A , n , dim )

Circularly shift the elements in a calendarDuration array.

B = circshift ( A , n ) circularly shifts the
elements of the calendarDuration array A according to n . If
n is a nonzero integer scalar, then the elements of A are
shifted by n elements along the first non-singleton dimension of
A . If n is a vector, it must not be longer that the number
of dimensions of A with each value of n corresponding to a
dimension in A . The sign of the value(s) in n specify the
direction in the elements of A are shifted.

B = circshift ( A , n , dim ) circularly
shifts the elements of the calendarDuration array A along the
dimension specified by dim . In this case, n must be a scalar
integer value.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Circularly shift the elements in a calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
calendarDuration.ctranspose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 267
calendarDuration: B = ctranspose ( A )

Transpose a calendarDuration matrix.

B = ctranspose ( A ) is the equivalent of the syntax
B = A ' and returns the transpose of the
calendarDuration matrix A . For calendarDuration arrays,
ctranspose is identical to transpose .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Transpose a calendarDuration matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
calendarDuration.datevec


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1178
calendarDuration: DV = datevec ( calD )
calendarDuration: [ Y , MO ] = datevec ( calD )
calendarDuration: [ Y , MO , D ] = datevec ( calD )
calendarDuration: [ Y , MO , D , H ] = datevec ( calD )
calendarDuration: [ Y , MO , D , H , MI ] = datevec ( calD )
calendarDuration: [ Y , MO , D , H , MI , S ] = datevec ( calD )

Convert calendarDuration array to date vectors.

DV = datevec ( calD ) returns an N&times;6 numeric
matrix, where N is the number of elements in calD and the
columns corresponds to years, months, days, hours, minutes, and seconds,
respectively.

When datevec is called with more than one output arguments, then
it returns the components of the date vectors as individual variables
Y , MO , D , H , MI ,and S corresponding
to years, months, days, hours, minutes, and seconds, respectively. In
this case, the individual variables have the same size as the input array
calD .

Every component carries the sign of the span as a whole, so a negative
calendar duration returns negative components throughout. An element
that is not finite has no components to divide between: all six take that
same infinity, or NaN , which is what split returns for it
as well.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Convert calendarDuration array to date vectors.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
calendarDuration.dispstrings


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 733
calendarDuration: cstr = dispstrings ( calD )

Get display formatted strings for each element of a calendarDuration
array.

cstr = dispstrings ( calD ) returns a cellstr array of
character vectors, cstr , which has the same size as the input
calendarDuration array, calD . The returned text representations
in cstr are formatted according to the 'Format' property
of the input array calD .

Whole calendar units are rendered with up to six significant digits and
the seconds component with five, each switching to exponent notation
beyond that, so a million days reads '1e+06d' . Rounding applies
to a component on its own and never carries into the one above it, which
is why 59.9999 seconds read '60s' rather than a further
minute.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 75
Get display formatted strings for each element of a calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
calendarDuration.empty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 732
calendarDuration: E = calendarDuration.empty ()
calendarDuration: E = calendarDuration.empty ( sz )
calendarDuration: E = calendarDuration.empty ( m , n , &hellip;)

Create an empty calendarDuration array.

E = calendarDuration.empty () returns a 0&times;0 empty
calendarDuration array. calendarDuration.empty ( m , n ,
&hellip;) or calendarDuration.empty ( sz ) returns an empty
calendarDuration array of the requested size, which must have at least
one dimension equal to zero. A lone dimension gives a square size, so
calendarDuration.empty (3) is an error while
calendarDuration.empty (0) is 0&times;0 . As for zeros , a
negative dimension counts as zero, and a size vector with nothing in it
names no size and gives 0&times;0 .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Create an empty calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
calendarDuration.eq


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1110
calendarDuration: TF = eq ( A , B )

Test for equality between calendarDuration arrays.

TF = eq ( A , B ) is the equivalent of the syntax
TF = A == B and returns a logical array with
elements set to true where calendarDuration arrays A and
B are equal, otherwise set to false . Missing values are
not equal to each other. Hence, any NaN values in A or
B result to false elements in TF .

A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1. The size of the
output TF is the same as the size of input arrays after their
expansion according to the broadcasting rules.

MATLAB defines no equality for calendarDuration arrays, so this is an
Octave extension. Two spans are compared component by component, which
is what MATLAB&rsquo;s own isequal does, so the two agree element for
element: calweeks (1) == caldays (7) is true , both being
seven days, while caldays (1) == calendarDuration (0, 0, 0, 24,
0, 0) is false , a day and twenty-four hours sitting in
different components.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Test for equality between calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
calendarDuration.horzcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 591
calendarDuration: C = horzcat ( A , B , &hellip;)

Horizontal concatenation of calendarDuration arrays.

C = horzcat ( A , B , &hellip; is the equivalent of
the syntax B = [ A , B , &hellip;] and horizontally
concatenates the calendarDuration arrays A , B , &hellip;. All
input arrays must have the same size except along the second dimension.
Any of the input arrays may also be string arrays or cell arrays of
character vectors of compatible size. Additionally, an input can be a
numeric matrix, which when parsed to the constructor will return a
calendarDuration array of compatible size.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Horizontal concatenation of calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
calendarDuration.ipermute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 499
calendarDuration: A = ipermute ( B , dims )

Inverse of the generalized transpose for a calendarDuration N-D array.

A = ipermute ( B , dims ) returns the inverse of
the generalized transpose performed by the permute function. The
expression ipermute (permute ( A , dims ), dims )
returns the original array A .

dims must index all the dimensions 1:ndims ( B ) of the
input array B , in any order, but only once. The dimension of
B specified in dims ( N ) gets remapped to the
N th dimension of A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
Inverse of the generalized transpose for a calendarDuration N-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
calendarDuration.iscolumn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 334
calendarDuration: TF = iscolumn ( calD )

Return true if calendarDuration array is a column vector.

TF = iscolumn ( calD ) returns a logical scalar
TF , which is true if the calendar duration array calD
is a column vector and false otherwise. A column vector is a 2-D
array for which size ( X ) returns [ N , 1] with
non-negative N .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
Return true if calendarDuration array is a column vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
calendarDuration.isempty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 221
calendarDuration: TF = isempty ( calD )

Return true if calendarDuration array is empty.

TF = isempty ( calD ) returns a logical scalar TF ,
which is true if the calendar duration array calD is empty
and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Return true if calendarDuration array is empty.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
calendarDuration.isequal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 535
calendarDuration: TF = isequal ( calD1 , calD2 )
calendarDuration: TF = isequal ( calD1 , calD2 , &hellip;)

Return true if calendarDuration arrays are equal.

TF = isequal ( calD1 , calD2 ) returns a logical
scalar TF , which is true if the calendar duration arrays
calD1 and calD2 contain the same values and false
otherwise.

TF = isequal ( calD1 , calD2 , &hellip;) returns a
logical scalar TF , which is true if all input arguments are
calendar duration arrays with equal values in each corresponding elements
and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Return true if calendarDuration arrays are equal.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
calendarDuration.isequaln


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 629
calendarDuration: TF = isequaln ( calD1 , calD2 )
calendarDuration: TF = isequaln ( calD1 , calD2 , &hellip;)

Return true if calendarDuration arrays are equal under the assumption
that missing elements are equal.

TF = isequaln ( calD1 , calD2 ) returns a logical
scalar TF , which is true if the calendar duration arrays
calD1 and calD2 contain the same values or corresponding
missing elements and false otherwise.

TF = isequaln ( calD1 , calD2 , &hellip;) returns a
logical scalar TF , which is true if all input arguments
are calendar duration arrays with equal values or corresponding missing
elements and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 102
Return true if calendarDuration arrays are equal under the assumption that missing elements are equal.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
calendarDuration.isfinite


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 331
calendarDuration: TF = isfinite ( calD )

Return true for calendar durations that are finite.

TF = isfinite ( calD ) returns a logical array TF
of the same size as calD containing true for each
corresponding element of calD that is finite and false
otherwise. Finite elements are those which are neither infinite nor
Not-A-Number.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Return true for calendar durations that are finite.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
calendarDuration.isinf


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 268
calendarDuration: TF = isinf ( calD )

Return true for calendar durations that are infinite.

TF = isinf ( calD ) returns a logical array TF
of the same size as calD containing true for each
corresponding element of calD that is either Inf or
-Inf and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Return true for calendar durations that are infinite.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
calendarDuration.ismatrix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 358
calendarDuration: TF = ismatrix ( calD )

Return true if calendarDuration array is a 2-D array.

TF = ismatrix ( calD ) returns a logical scalar
TF , which is true if the calendarDuration array calD
is a matrix and false otherwise. A matrix is an array of any
type where ndims ( X ) == 2 and for which
size ( X ) returns [ H , W ] with non-negative
H and W .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Return true if calendarDuration array is a 2-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
calendarDuration.ismissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 316
calendarDuration: TF = ismissing ( calD )

Find missing data in a calendarDuration array.

Missing values in calendarDuration arrays are represented by NaN ,
thus TF = ismissing ( calD ) is equivalent to
TF = isnan ( calD ) .

Note: ismissing for calendarDuration arrays does not support a
second Indicator argument.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Find missing data in a calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
calendarDuration.isnan


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 257
calendarDuration: TF = isnan ( calD )

Return true for calendar durations that are Not-A-Number.

TF = isnan ( calD ) returns a logical array TF
of the same size as calD containing true for each
corresponding element of calD that is NaN and false
otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
Return true for calendar durations that are Not-A-Number.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
calendarDuration.isreal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 204
calendarDuration: TF = isreal ( calD )

Always return true for calendarDuration arrays.

TF = isreal ( calD ) always returns a logical scalar
true value, if the input argument is a calendarDuration array.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Always return true for calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
calendarDuration.isrow


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 317
calendarDuration: TF = isrow ( calD )

Return true if calendarDuration array is a row vector.

TF = isrow ( calD ) returns a logical scalar TF ,
which is true if the calendarDuration array calD is a row
vector and false otherwise. A row vector is a 2-D array for
which size ( X ) returns [1, N ] with non-negative
N .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Return true if calendarDuration array is a row vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
calendarDuration.isscalar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 307
calendarDuration: TF = isscalar ( calD )

Return true if calendarDuration array is a scalar.

TF = isscalar ( calD ) returns a logical scalar
TF , which is true if the calendarDuration array calD
is also a scalar and false otherwise. A scalar is a single
element object for which size ( X ) returns [1, 1] .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Return true if calendarDuration array is a scalar.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
calendarDuration.isvector


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 374
calendarDuration: TF = isvector ( calD )

Return true if calendarDuration array is a vector.

TF = isvector ( calD ) returns a logical scalar
TF , which is true if the calendarDuration array calD
is a vector and false otherwise. A vector is a 2-D array for
which one of the dimensions is equal to 1 (either 1&times;N or
N&times;1 ). By definition, a scalar is also a vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Return true if calendarDuration array is a vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
calendarDuration.keyHash


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1238
calendarDuration: key = keyHash ( calD )
calendarDuration: key = keyHash ( calD , base )

Generate a hash code for a calendarDuration array.

key = keyHash ( calD ) generates a uint64 scalar
that represents the input array calD . keyHash utilizes the
64-bit FNV-1a variant of the Fowler-Noll-Vo non-cryptographic hash
function.

key = keyHash ( calD , base ) also generates a
64-bit hash code using base as the offset basis for the FNV-1a
hash algorithm. base must be a uint64 integer type
scalar. Use this syntax to cascade keyHash on multiple objects
for which a single hash code is required.

A calendarDuration array is keyed on its months, days and time
components, so calendar units that are interchangeable share a key:
calmonths (12) hashes as calyears (1) , and
calweeks (1) as caldays (7) . Units that are not
interchangeable stay distinct, calmonths (1) and
caldays (30) among them. The Format property is display
only and is not part of the key. Two arrays that keyMatch
reports as the same key always hash alike.

Note that unlike MATLAB, this implementation does not use any random
seed. As a result, keyHash will always generate the exact same
hash key for any particular input across different workers and Octave
sessions.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Generate a hash code for a calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
calendarDuration.length


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 262
calendarDuration: N = length ( calD )

Length of a calendarDuration vector.

N = length ( calD ) returns the size of the longest
dimension of the calendarDuration array calD , unless any of its
dimensions has zero length, in which case length ( calD )
returns 0.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Length of a calendarDuration vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
calendarDuration.minus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 708
calendarDuration: C = minus ( A , B )

Subtraction for calendarDuration arrays.

C = minus ( A , B ) is the equivalent of the syntax
C = A - B and returns the result of subtracting
the corresponding elements of B from those of A . C is
a calendarDuration array of the same size as the input arguments after
the necessary (if required) expansion. A and B must be size
compatible, which translates to they can be the same size, one can be
scalar, or for every dimension, their dimension sizes must be equal or
one of them must be 1.

Either A or B may also be a duration or a numeric array with
the latter representing duration days and being internally converted to a
duration array with the days () function.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Subtraction for calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
calendarDuration.mtimes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 611
calendarDuration: C = mtimes ( A , B )

Matrix multiplication for calendarDuration arrays.

C = mtimes ( A , B ) is the equivalent of the
syntax C = A * B and returns the matrix
multiplication product of inputs A and B . Either A or
B must be a calendarDuration array and its complement must be a
double array.

C is a calendarDuration array of the same size as the input
arguments after the necessary (if required) expansion. A and
B must be size compatible, which translates to they can be the same
size, one can be scalar, or for every dimension, their dimension sizes
must be equal or one of them must be 1.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Matrix multiplication for calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
calendarDuration.ndims


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 182
calendarDuration: out = ndims ( calD )

Number of dimensions in a calendarDuration array.

out = ndims ( calD ) returns the number of dimensions
of the calendar duration array calD .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Number of dimensions in a calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
calendarDuration.ne


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1115
calendarDuration: TF = ne ( A , B )

Test for inequality between calendarDuration arrays.

TF = ne ( A , B ) is the equivalent of the syntax
TF = A != B and returns a logical array with
elements set to true where calendarDuration arrays A and
B are not equal, otherwise set to false . Missing values
are not equal to each other. Hence, any NaN values in A or
B result to true elements in TF .

A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1. The size of the
output TF is the same as the size of input arrays after their
expansion according to the broadcasting rules.

MATLAB defines no equality for calendarDuration arrays, so this is an
Octave extension. Two spans are compared component by component, which
is what MATLAB&rsquo;s own isequal does, so the two agree element for
element: calweeks (1) == caldays (7) is true , both being
seven days, while caldays (1) == calendarDuration (0, 0, 0, 24,
0, 0) is false , a day and twenty-four hours sitting in
different components.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Test for inequality between calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
calendarDuration.nnz


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 188
calendarDuration: out = nnz ( calD )

Number of nonzero elements in calendarDuration array.

out = nnz ( calD ) returns the number of nonzero
elements in the calendar duration array calD .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Number of nonzero elements in calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
calendarDuration.numel


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 183
calendarDuration: out = numel ( calD )

Total number of elements in a calendarDuration array.

out = numel ( calD ) returns the number of elements in
the calendarDuration array calD .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Total number of elements in a calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
calendarDuration.permute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 465
calendarDuration: B = permute ( A , dims )

Generalized transpose for a calendarDuration N-D array.

B = permute ( A , dims ) returns the generalized
transpose of the calendarDuration array A by rearranging its
dimensions according to the permutation vector specified in dims .

dims must index all the dimensions 1:ndims ( A ) of the
input array A , in any order, but only once. The N th
dimension of A gets remapped to the dimension in B specified
by dims ( N ) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Generalized transpose for a calendarDuration N-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
calendarDuration.plus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 688
calendarDuration: C = plus ( A , B )

Addition for calendarDuration arrays.

C = plus ( A , B ) is the equivalent of the syntax
C = A + B and returns the result of adding the
corresponding elements of A and B . C is a
calendarDuration array of the same size as the input arguments after the
necessary (if required) expansion. A and B must be size
compatible, which translates to they can be the same size, one can be
scalar, or for every dimension, their dimension sizes must be equal or
one of them must be 1.

Either A or B may also be a duration or a numeric array with
the latter representing duration days and being internally converted to a
duration array with the days () function.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Addition for calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
calendarDuration.repelem


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1006
calendarDuration: B = repelem ( A , n )
calendarDuration: B = repelem ( A , d1 , &hellip;, dN )

Repeat copies of calendarDuration array elements.

B = repelem ( A , n ) returns a calendarDuration
vector B containing repeated elements of the input A , which
must be a calendarDuration vector. If n is a scalar, each element
of A is repeated n times along the non-singleton dimension of
A . If n is a vector, it must have the same elements as
A , in which case it specifies the number of times to repeat each
corresponding element of A .

B = repelem ( A , d1 , &hellip;, dN ) returns
an array B with each element of A repeated according to the
the list of input arguments d1 , &hellip;, dN each
corresponding to a different dimension 1:ndims ( A ) of the
input array A . d1 , &hellip;, dN must be either scalars
or vectors with the same length as the corresponding dimension of
A containing non-negative integer values specifying the number of
repetitions of each element along the corresponding dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Repeat copies of calendarDuration array elements.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
calendarDuration.repelems


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 493
calendarDuration: B = repelems ( A , R )

Construct a vector of repeated elements from a calendarDuration array.

B = repelems ( A , R ) returns a calendarDuration
vector B containing repeated elements of the input A , which
must be a calendarDuration vector. R must be a 2&times;N matrix
of integers. Entries in the first row of R correspond to the
linear indexing of the elements in A to be repeated. The
corresponding entries in the second row of R specify the repeat
count of each element.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
Construct a vector of repeated elements from a calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
calendarDuration.repmat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 658
calendarDuration: B = repmat ( A , n )
calendarDuration: B = repmat ( A , d1 , &hellip;, dN )
calendarDuration: B = repmat ( A , dimvec )

Repeat copies of a calendarDuration array.

B = repmat ( A , n ) returns a calendarDuration
array B containing n copies of the input calendarDuration
array A along every dimension of A .

B = repmat ( A , d1 , &hellip;, dN ) returns an
array B containing copies of A along the dimensions specified
by the list of scalar integer values d1 , &hellip;, dN , which
specify how many copies of A are made in each dimension.

B = repmat ( A , dimvec ) is equivalent to the
previous syntax with dimvec = [ d1 , &hellip;, dN ] .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Repeat copies of a calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
calendarDuration.reshape


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 808
calendarDuration: B = reshape ( A , d1 , &hellip;, dN )
calendarDuration: B = reshape ( A , &hellip;, [] , &hellip;)
calendarDuration: B = reshape ( A , dimvec )

Reshape calendarDuration array.

B = reshape ( A , d1 , &hellip;, dN ) returns a
calendarDuration array B with specified dimensions d1 ,
&hellip;, dN , whose elements are taken columnwise from the
calendarDuration array A . The product of d1 , &hellip;,
dN must equal the total number of elements in A .

B = reshape ( A , &hellip;, [] , &hellip;) returns
a calendarDuration array B with one dimension unspecified which is
calculated automatically so that the product of dimensions in B
matches the total elements in A , which must be divisible the
product of specified dimensions. An empty matrix ([]) is used to
flag the unspecified dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Reshape calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
calendarDuration.size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1130
calendarDuration: sz = size ( calD )
calendarDuration: dim_sz = size ( calD , dim )
calendarDuration: dim_sz = size ( calD , d1 , d2 , &hellip;)
calendarDuration: [ rows , columns , &hellip;, dim_n_sz ] = size (&hellip;)

Size of a calendarDuration array.

sz = size ( calD ) returns a row vector with the size
(number of elements) of each dimension for the calendar duration array
calD .

dim_sz = size ( calD , dim ) returns the size of
the corresponding dimension specified in dim . If dim is a
vector, then dim_sz is a vector of the same length and with each
element corresponding to a specified dimension. Multiple dimensions may
also be specified as separate arguments.

With a single output argument, size returns a row vector. With
several, the size of dimension N is returned in the Nth argument.
Asking for fewer output arguments than the array has dimensions folds
the trailing dimensions into the last one, so [r, c] = size
( calD ) on a 2-by-2-by-2 array returns 2 and 4; asking for more
pads with ones. When a dimension is named, however, the number of output
arguments must equal the number of dimensions requested.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Size of a calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
calendarDuration.split


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1461
calendarDuration: [&hellip;] = split ( calD , units )

Split calendarDuration array into numeric and duration units.

[&hellip;] = split ( calD , units ) splits the calendar
duration units in calD into separate numeric arrays according to
date/time units specified in units , which must be either a cell
array of character vectors or a string array containing any of the
following date/time units in descending order.

'years'
'quarters'
'months'
'weeks'
'days'
'time'

When a single date/time unit is specified, units may also be a
character vector. When 'time' is specified in units , the
corresponding returned argument is a duration array. The values
of years, quarters, and months are computed independently from the values
of weeks and days in calD , with larger units taking precedence when
specified The same applies for duration arrays, when requested.

Each unit may be abbreviated to any leading part of its name and is
matched without regard to case, so 'y' , 'Year' and
'YEARS' all name years. No abbreviation is ambiguous, the six
names starting with six different letters. A unit named more than once
still asks for a single component.

Fewer output arguments than units may be requested, in which case only
the leading ones are returned; asking for more is an error. An element
that is not finite keeps that same value in every component it is divided
into, so splitting an infinite calendar duration gives infinite years,
months and days alike.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Split calendarDuration array into numeric and duration units.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
calendarDuration.time


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 189
calendarDuration: T = time ( calD )

Return time portion of calendarDuration array.

T = time ( calD ) returns a duration array T with
the time portions of the calendarDuration array calD .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Return time portion of calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
calendarDuration.times


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 634
calendarDuration: C = times ( A , B )

Element-by-element multiplication for calendarDuration arrays.

C = times ( A , B ) is the equivalent of the syntax
C = A .* B and returns the element-by-element
multiplication product of inputs A and B . Either A or
B must be a calendarDuration array and its complement must be a
double array.

C is a calendarDuration array of the same size as the input
arguments after the necessary (if required) expansion. A and
B must be size compatible, which translates to they can be the same
size, one can be scalar, or for every dimension, their dimension sizes
must be equal or one of them must be 1.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Element-by-element multiplication for calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
calendarDuration.transpose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 198
calendarDuration: B = transpose ( A )

Transpose a calendarDuration matrix.

B = transpose ( A ) is the equivalent of the syntax
B = A .' and returns the transpose of the
calendarDuration matrix A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Transpose a calendarDuration matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
calendarDuration.uminus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 230
calendarDuration: C = minus ( A )

Unary minus for calendarDuration arrays.

C = uminus ( A ) is the equivalent of the syntax
C = - A and returns A after negating its
elements. C is a calendarDuration array of the same size as
A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Unary minus for calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
calendarDuration.unique


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1973
calendarDuration: B = unique ( A )
calendarDuration: B = unique ( A , setOrder )
calendarDuration: B = unique ( A , occurrence )
calendarDuration: B = unique ( A , setOrder , occurrence )
calendarDuration: B = unique ( A , occurrence , setOrder )
calendarDuration: B = unique ( A , &hellip;, 'rows' )
calendarDuration: [ B , ixA , ixB ] = unique (&hellip;)

Unique values in a calendarDuration array.

B = unique ( A ) returns the unique values of the
calendarDuration array A in sorted order.

B = unique ( A , setOrder ) returns the unique
values of the calendarDuration array A in an order as specified by
setOrder , which can be either of the following values:

'sorted' (default) returns the unique values sorted in
ascending order.
'stable' returns the unique values according to their order
of occurrence.

B = unique ( A , occurrence ) returns the unique
values of the calendarDuration array tblA according to their order
of occurrence. occurrence can be either of the following values:

'first' (default) returns the first occurrence of each
unique value, i.e. the lowest possible indices are returned.
'last' returns the last occurrence of each unique value,
i.e. the highest possible indices are returned.

You can specify setOrder and occurrence arguments together.

B = unique ( A , &hellip;, 'rows' ) returns the
unique rows of A by treating each row as a single entity. The
'rows' option can be used alone or in any combination with the
setOrder and occurrence arguments. 'rows' can be
placed at any position in the function&rsquo;s argument list after the input
array A . However, this syntax is only valid for 2-dimensional
calendarDuration arrays.

[ tblB , ixA , ixB ] = unique (&hellip;) also returns
index vectors ixA and ixB using any of the previous syntaxes.
ixA and ixB map the arrays A and B to one another
such that B = A ( ixA ) and
A = B ( ixB ) . When the 'rows' optional
argument is specified, then B = A ( ixA ,:) and
tblA = tblB ( ixB ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Unique values in a calendarDuration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
calendarDuration.uplus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 211
calendarDuration: C = uplus ( A )

Unary plus for calendarDuration arrays.

C = uplus ( A ) is the equivalent of the syntax
C = + A and returns a copy of A . C is a
calendarDuration array of the same size as A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Unary plus for calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
calendarDuration.vertcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 586
calendarDuration: C = vertcat ( A , B , &hellip;)

Vertical concatenation of calendarDuration arrays.

C = vertcat ( A , B , &hellip; is the equivalent of
the syntax B = [ A ; B ; &hellip;] and vertically
concatenates the calendarDuration arrays A , B , &hellip;. All
input arrays must have the same size except along the first dimension.
Any of the input arrays may also be string arrays or cell arrays of
character vectors of compatible size. Additionally, an input can be a
numeric matrix, which when parsed to the constructor will return a
calendarDuration array of compatible size.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Vertical concatenation of calendarDuration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
calmonths


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 449
datatypes: calD = calmonths ( X )

Calendar duration in months.

calD = calmonths ( X ) returns a calendarDuration
array representing calendar months equivalent to the values in X , which
must be a numeric array of integer values.

calmonths is also available as a method for calendarDuration
arrays, in which case it performs the opposite conversion.

See also:
calendarDuration,
calyears,
calquarters,
calweeks,
caldays,
calendarDuration.calmonths


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Calendar duration in months.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
calquarters


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 459
datatypes: calD = calquarters ( X )

Calendar duration in quarters.

calD = calquarters ( X ) returns a calendarDuration
array representing calendar quarters equivalent to the values in X ,
which must be a numeric array of integer values.

calquarters is also available as a method for calendarDuration
arrays, in which case it performs the opposite conversion.

See also:
calendarDuration,
calyears,
calmonths,
calweeks,
caldays,
calendarDuration.calquarters


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Calendar duration in quarters.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
calweeks


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 444
datatypes: calD = calweeks ( X )

Calendar duration in weeks.

calD = calweeks ( X ) returns a calendarDuration
array representing calendar weeks equivalent to the values in X , which
must be a numeric array of integer values.

calweeks is also available as a method for calendarDuration
arrays, in which case it performs the opposite conversion.

See also:
calendarDuration,
calyears,
calquarters,
calmonths,
caldays,
calendarDuration.calweeks


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Calendar duration in weeks.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
calyears


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 444
datatypes: calD = calyears ( X )

Calendar duration in years.

calD = calyears ( X ) returns a calendarDuration
array representing calendar years equivalent to the values in X , which
must be a numeric array of integer values.

calyears is also available as a method for calendarDuration
arrays, in which case it performs the opposite conversion.

See also:
calendarDuration,
calquarters,
calmonths,
calweeks,
caldays,
calendarDuration.calyears


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Calendar duration in years.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
categorical


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 952
datatypes: categorical

Array representing categorical data.

A categorical array represents an array of values that correspond
to a finite set of discrete categories, which can be either ordinal (having
a mathematical ordering) or nominal. It is an efficient way to define
groups of rows in a table or to other types of variables.

Each categorical array stores the list of categories as a cell array
of character vectors and a numeric array of uint16 type as indices
to the categories. The categorical array may also store elements of
undefined categorical values, which represent the absence of a given
category and correspond to the NaN value for numeric arrays or in
general to the missing value for other data types.

categorical arrays do not have any public properties, which can be
indexed by using dot notation similarly to structures. However, there are
several methods which can be used to modify their categories once they are
constructed.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Array representing categorical data.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.addcats


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1091
categorical: B = addcats ( A , newcats )
categorical: B = addcats (&hellip;, 'After' , catname )
categorical: B = addcats (&hellip;, 'Before' , catname )

Add categories to categorical array.

B = addcats ( A , newcats ) appends new categories
specified in newcats to the categorical array A at the end of
any existing categories. The output categorical array B does not
contain elements that belong to the newly added categories.

B = addcats (&hellip;, 'After' , catname ) adds
the categories after the existing category specified by catname .

B = addcats (&hellip;, 'Before' , catname ) adds
the categories before the existing category specified by catname .

catname must be either a character vector, a cellstr scalar or a
string scalar. newcats can be a string array, a cell array of
character vectors, or any type of array that can be converted to a cell
array of character vectors with the cellstr function, as long as
it does not contain any duplicate names or references existing category
in A .

When adding a single category, newcats can also be specified as a
character vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Add categories to categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
categorical.cat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 965
categorical: C = cat ( dim , A , B , &hellip;)

Concatenate categorical arrays.

C = cat ( dim , A , B , &hellip;) concatenates
categorical arrays A , B , &hellip; along dimension dim .
All input arrays must have the same size except along the operating
dimension dim . Any of the input arrays may also be string arrays
or cell arrays of character vectors of compatible size.

If any input array is an ordinal categorical array, then all inputs must
be ordinal categorical arrays with the same set and ordering of
categories. In this case, C is also an ordinal categorical array
with the same set and ordering of categories. If none of the input
arrays are ordinal, then they do not need to have the same set of
categories. In this case, categorical array C contains the union
of the categories from all input arrays. Protected categorical arrays
can only be concatenated with other arrays that have the same set of
categories but not necessarily in the same order.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Concatenate categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
categorical.categorical


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3273
categorical: C = categorical ( A )
categorical: C = categorical ( A , valueset )
categorical: C = categorical ( A , valueset , catnames )
categorical: C = categorical (&hellip;, Name , Value )

Create a new array of categorical values.

C = categorical ( A ) creates a categorical array
C from the input array A , which can be numeric, logical,
datetime, duration, string, or cell array of character vectors. Input
A can also be another categorical array. The categories in C
the sorted unique values from the input array A . When the input
array is string or cell array of character vectors, any leading or
trailing white spaces are removed. Missing values in the input array
correspond to <undefined> elements in the created categorical
array. By default, there is no category for undefined values in the
output array.

C = categorical ( A , valueset ) creates a
categorical array from input A with the categories specified in
valueset , which must be a vector of unique values. The data type
of input array A and valueset must be the same, unless they
are string or cell arrays of character vectors, in which case they can be
used interchangeably. Similarly to input array A any leading or
trailing white spaces are removed, if valueset is a string or cell
array of character vectors.

C = categorical ( A , valueset , catnames )
creates a categorical array from input A with the categories
specified in valueset and named after the corresponding values in
catnames , which must be specified either as a string array or a
cell array of character vectors. If omitted, categorical uses
the cellstring representation of valueset to name the specified
category names. catnames must not contain any missing values, it
may have duplicate names, and it must have the same number of elements as
valueset .

C = categorical (&hellip;, Name , Value ) further
specifies additional parameters for creating categorical array C .

"Ordinal" must be a logical scalar specifying that the
categories in C have a numeric ordering relationship. By default,
it is false and categorical creates a non-ordinal array.
The elements of unordered categorical arrays can only be compared for
equality. Any other relational operator cannot be used. Setting
"Ordinal" to true results in a categorical array with
mathematically ordered categories. The ordering goes from smallest to
largest according to the order in valueset or the order of
appearance in input array A , when valueset is not specified,
in which case the unique values in A are not sorted in order to set
the categories. Ordinal categorical arrays allow for relational
operators such as >=, >, <=, < , as well as statistical operations
such as min , max , and median .
"Protected" must be a logical scalar specifying that the
categories in C are protected. By default, it is false for
unordered categorical arrays and it is always true for ordinal
categorical arrays. Setting "Protected" to true prevents
from assigning new values that do not correspond to existing categories.
When false , assigning new values to the array automatically
updates the categories. Hence, categorical arrays with different sets of
categories can be combined/merged into a new array with set operations.

See also:
categories ,
discretize,
iscategorical


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Create a new array of categorical values.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
categorical.categories


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 185
categorical: cstr = categories ( C )

List of categories in categorical array.

cstr = categories ( C ) returns a cell array of
character vectors with the names of the categories in C .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
List of categories in categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.cellstr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 226
categorical: cstr = cellstr ( C )

Convert categorical array to a cell array of character vectors.

cstr = cellstr ( C ) returns a cellstr array of
character vectors, cstr , which has the same size as the input
categorical C .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
Convert categorical array to a cell array of character vectors.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
categorical.char


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 244
categorical: CM = char ( C )

Convert categorical array to a 2-D character matrix.

CM = char ( C ) returns a character matrix CM ,
which contains numel ( C ) rows and each row contains the
category name for the corresponding element of C (:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Convert categorical array to a 2-D character matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
categorical.circshift


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 758
categorical: B = circshift ( A , n )
categorical: B = circshift ( A , n , dim )

Circularly shift the elements in a categorical array.

B = circshift ( A , n ) circularly shifts the
elements of the categorical array A according to n . If
n is a nonzero integer scalar, then the elements of A are
shifted by n elements along the first non-singleton dimension of
A . If n is a vector, it must not be longer that the number
of dimensions of A with each value of n corresponding to a
dimension in A . The sign of the value(s) in n specify the
direction in the elements of A are shifted.

B = circshift ( A , n , dim ) circularly
shifts the elements of the categorical array A along the dimension
specified by dim . In this case, n must be a scalar integer
value.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Circularly shift the elements in a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
categorical.countcats


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 539
categorical: N = countcats ( C )
categorical: N = countcats ( C , dim )

Count occurrences of categories in a categorical array.

N = countcats ( C ) returns the number of elements for
each category in C . If C is a vector, N is also a
vector with one element for each category in C . If C is a
matrix, N is a matrix with each column containing the category
counts from each column of C . For multidimensional arrays,
countcats operates along the first non-singleton dimension.

N = countcats ( C , dim ) operates along the
dimension dim .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Count occurrences of categories in a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
categorical.ctranspose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 247
categorical: B = ctranspose ( A )

Transpose a categorical matrix.

B = ctranspose ( A ) is the equivalent of the syntax
B = A ' and returns the transpose of the categorical
matrix A . For categorical arrays, ctranspose is identical
to transpose .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Transpose a categorical matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
categorical.dispstrings


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 241
categorical: cstr = dispstrings ( C )

Get display formatted strings for each element of a categorical array.

cstr = dispstrings ( C ) returns a cellstr array of
character vectors, cstr , which has the same size as the input
categorical C .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
Get display formatted strings for each element of a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
categorical.double


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 216
categorical: out = double ( C )

Convert categorical array to a double array.

out = double ( C ) returns a double array indexing the
categories in C . Categorical elements of undefined category are
returned as NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Convert categorical array to a double array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
categorical.empty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 681
categorical: E = categorical.empty ()
categorical: E = categorical.empty ( sz )
categorical: E = categorical.empty ( m , n , &hellip;)

Create an empty categorical array.

E = categorical.empty () returns a 0&times;0 empty
categorical array with no categories. categorical.empty ( m ,
n , &hellip;) or categorical.empty ( sz ) returns an
empty categorical array of the requested size, which must have at least
one dimension equal to zero. A lone dimension gives a square size, so
categorical.empty (3) is an error while
categorical.empty (0) is 0&times;0 . As for zeros , a
negative dimension counts as zero, and a size vector with nothing in it
names no size and gives 0&times;0 .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Create an empty categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
categorical.eq


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1222
categorical: TF = eq ( A , B )

Equality for categorical arrays.

TF = eq ( A , B ) is the equivalent of the syntax
TF = A == B and returns a logical array of the
same size as the largest input with its elements set to true
where the corresponding elements of A and B are equal and set
to false where they are not. A and B must be size
compatible, which translates to they can be the same size, one can be
scalar, or for every dimension, their dimension sizes must be equal or
one of them must be 1.

If categorical arrays A and B are ordinal, they must have
the same set and ordering of categories. If neither are ordinal, the
category names of each pair of elements are compared. Hence, they do
not need to have the same set of categories.

One of the input arguments can also be a character vector, a cellstr
scalar or a string scalar as long as the other is a categorical array.
In this case, a logical array of the same size as the categorical array
is returned in which every element is tested for equality by comparing
its category with that specified by the string argument.

Undefined elements always return false , since they are not
comparable to any other categorical values including other undefined
elements.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Equality for categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
categorical.ge


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1240
categorical: TF = ge ( A , B )

Greater than or equal to for ordinal categorical arrays.

TF = ge ( A , B ) is the equivalent of the syntax
TF = A >= B and returns a logical array of the
same size as the largest input with its elements set to true
where the corresponding elements of A are greater than or equal to
B and set to false where they are not. A and B
must be size compatible, which translates to they can be the same size,
one can be scalar, or for every dimension, their dimension sizes must be
equal or one of them must be 1.

If categorical arrays A and B are both ordinal, they must
have the same set and ordering of categories. Unordered categorical
arrays cannot be compared for greater than or equal to inequality.

One of the input arguments can also be a character vector, a cellstr
scalar or a string scalar as long as the other is a categorical array.
In this case, a logical array of the same size as the categorical array
is returned in which every element is tested for greater than or equal to
inequality by comparing its category with that specified by the string
argument.

Undefined elements always return false , since they are not
comparable to any other categorical values including other undefined
elements.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Greater than or equal to for ordinal categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
categorical.gt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1191
categorical: TF = gt ( A , B )

Greater than for ordinal categorical arrays.

TF = gt ( A , B ) is the equivalent of the syntax
TF = A > B and returns a logical array of the
same size as the largest input with its elements set to true
where the corresponding elements of A are greater than B and
set to false where they are not. A and B must be
size compatible, which translates to they can be the same size, one can
be scalar, or for every dimension, their dimension sizes must be equal or
one of them must be 1.

If categorical arrays A and B are both ordinal, they must
have the same set and ordering of categories. Unordered categorical
arrays cannot be compared for greater than inequality.

One of the input arguments can also be a character vector, a cellstr
scalar or a string scalar as long as the other is a categorical array.
In this case, a logical array of the same size as the categorical array
is returned in which every element is tested for greater than inequality
by comparing its category with that specified by the string argument.

Undefined elements always return false , since they are not
comparable to any other categorical values including other undefined
elements.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Greater than for ordinal categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
categorical.histcounts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1931
categorical: N = histcounts ( A )
categorical: N = histcounts ( A , cats )
categorical: N = histcounts (&hellip;, 'Normalization' , normtype )
categorical: [ N , cats ] = histcounts (&hellip;)

Histogram bin counts of a categorical array.

N = histcounts ( A ) returns a numeric vector N
with the number of elements of each category in A . A can be
a categorical array of any dimensions, but it is converted internally to
a single column vector.

N = histcounts ( A , cats ) returns the number of
elements only for the categories named in cats , in the order they
are named there. cats may be a categorical array, a string array,
or a cell array of character vectors, and the names must be unique. A
name that is not a category of A is not an error: it counts zero.
Note that <undefined> elements are counted under no name at all,
so they never appear in N .

N = histcounts (&hellip;, 'Normalization' ,
normtype ) specifies how to normalize the histogram values returned
in N with any of the following options specified in normtype :

'count' , which is the default, returns the number of
elements in each category.
'countdensity' is the same as 'count' , since the
bin width in categorical arrays is always equal to 1.
'probability' returns the number of elements in each
category relative to the total number of elements in A .
'percentage' returns the percentage of the elements of
A that fall in each category.
'pdf' is the same as 'probability' , since the bin
width in categorical arrays is always equal to 1.
'cumcount' returns the cumulative number of elements in
each category and all previous categories.
'cdf' returns the cumulative number of elements in
each category and all previous categories relative to the total number of
elements in A .

[ N , cats ] = histcounts (&hellip;) also returns the
corresponding categories of A for each count in N .
cats is a cell array of character vectors with the same size as
N .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Histogram bin counts of a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.horzcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1024
categorical: C = horzcat ( A , B , &hellip;)

Horizontal concatenation of categorical arrays.

C = horzcat ( A , B , &hellip; is the equivalent of
the syntax B = [ A , B , &hellip;] and horizontally
concatenates the categorical arrays A , B , &hellip;. All input
arrays must have the same size except along the second dimension. Any of
the input arrays may also be string arrays or cell arrays of character
vectors of compatible size.

If any input array is an ordinal categorical array, then all inputs must
be ordinal categorical arrays with the same set and ordering of
categories. In this case, C is also an ordinal categorical array
with the same set and ordering of categories. If none of the input
arrays are ordinal, then they do not need to have the same set of
categories. In this case, categorical array C contains the union
of the categories from all input arrays. Protected categorical arrays
can only be concatenated with other arrays that have the same set of
categories but not necessarily in the same order.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Horizontal concatenation of categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
categorical.int16


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 297
categorical: out = int16 ( C )

Convert categorical array to a int16 array.

out = int16 ( C ) returns a int16 array
indexing the categories in C . Categorical elements of undefined
category are returned as 0 . Note that the returned category
indices saturate to intmax ('int16') , which is 32767.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Convert categorical array to a int16 array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
categorical.int32


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 210
categorical: out = int32 ( C )

Convert categorical array to a int32 array.

out = int32 ( C ) returns a int32 array
indexing the categories in C . Categorical elements of undefined
category are returned as 0 .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Convert categorical array to a int32 array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
categorical.int64


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 210
categorical: out = int64 ( C )

Convert categorical array to a int64 array.

out = int64 ( C ) returns a int64 array
indexing the categories in C . Categorical elements of undefined
category are returned as 0 .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Convert categorical array to a int64 array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
categorical.int8


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 290
categorical: out = int8 ( C )

Convert categorical array to a int8 array.

out = int8 ( C ) returns a int8 array
indexing the categories in C . Categorical elements of undefined
category are returned as 0 . Note that the returned category
indices saturate to intmax ('int8') , which is 127.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Convert categorical array to a int8 array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
categorical.intersect


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1638
categorical: C = intersect ( A , B )
categorical: C = intersect ( A , B , 'rows' )
categorical: [ C , ixA , ixB ] = intersect (&hellip;)
categorical: &hellip; = intersect (&hellip;, order )

Set intersection of two categorical arrays.

C = intersect ( A , B ) returns the unique common
values of the categorical arrays A and B . Either A or
B input arguments may be a character vector, a string array, or a
cell array of character vectors, which is promoted to a categorical array
prior to set intersection. If both A and B are row vectors,
then C is also a row vector, otherwise intersect returns a
column vector.

If categorical arrays A and B are ordinal, they must have
the same set and ordering of categories, which is transfered to C .
If neither are ordinal, the category names of each pair of elements are
compared (they do not need to have the same set of categories) in which
case the categories in C are the sorted union of the categories in
A and B .

C = intersect ( A , B , 'rows' returns the
unique common rows of the categorical matrices A and B , which
must have the same number of columns. By default, the rows in
categorical matrix C are in sorted order.

[ C , ixA , ixB ] = intersect (&hellip;) also returns
index vectors ixA and ixB such that
C = A ( ixA ) and
C = B ( ixB ) , unless the 'rows' optional
argument is given, in which case C = A ( ixA ,:)
and C = B ( ixB ,:) .

&hellip; = intersect (&hellip;, order ) also specifies the
order of the returned unique values. order may be either
'sorted' , which is the default behavior, or 'stable' ,
in which case the unique values are returned in order of appearance.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Set intersection of two categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
categorical.ipermute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 489
categorical: A = ipermute ( B , dims )

Inverse of the generalized transpose for a categorical N-D array.

A = ipermute ( B , dims ) returns the inverse of
the generalized transpose performed by the permute function. The
expression ipermute (permute ( A , dims ), dims )
returns the original array A .

dims must index all the dimensions 1:ndims ( B ) of the
input array B , in any order, but only once. The dimension of
B specified in dims ( N ) gets remapped to the
N th dimension of A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Inverse of the generalized transpose for a categorical N-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
categorical.iscategory


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 302
categorical: TF = iscategory ( C , catnames )

Test for categories in a categorical array.

TF = iscategory ( C , catnames ) returns a logical
array TF of the same size as catnames containing true
for each corresponding element of catnames that is a category in
categorical array C and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Test for categories in a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
categorical.iscolumn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 312
categorical: TF = iscolumn ( C )

Return true if categorical array is a column vector.

TF = iscolumn ( C ) returns a logical scalar TF ,
which is true , if the categorical array C is a column
vector, and false otherwise. A column vector is a 2-D array for
which size ( X ) returns [ N , 1] with non-negative
N .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Return true if categorical array is a column vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.isempty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 199
categorical: TF = isempty ( C )

Return true if categorical array is empty.

TF = isempty ( C ) returns a logical scalar TF ,
which is true , if the categorical array C is empty, and
false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Return true if categorical array is empty.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.isequal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 859
categorical: TF = isequal ( C1 , C2 )
categorical: TF = isequal ( C1 , C2 , &hellip;)

Return true if categorical arrays are equal.

TF = isequal ( C1 , C2 ) returns a logical scalar
TF , which is true , if the categorical arrays C1 and
C2 contain the same values, and false otherwise. Either
C1 or C2 may also be a string array, a missing object array,
a character vector, or a cell array of character vectors, which will be
promoted to a categorical array prior to comparison.

If categorical arrays C1 and C2 are ordinal, they must have
the same set and ordering of categories. If neither are ordinal, the
category names of each pair of elements are compared. Hence, they do not
need to have the same set of categories.

TF = isequal ( C1 , C2 , &hellip;) returns a logical
scalar TF , which is true , if all input arguments are equal,
and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Return true if categorical arrays are equal.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
categorical.isequaln


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 954
categorical: TF = isequaln ( C1 , C2 )
categorical: TF = isequaln ( C1 , C2 , &hellip;)

Return true if categorical arrays are equal under the assumption that
undefined elements are equal.

TF = isequaln ( C1 , C2 ) returns a logical scalar
TF , which is true , if the categorical arrays C1 and
C2 contain the same values or corresponding undefined elements, and
false otherwise. Either C1 or C2 may also be a
string array, a missing object array, a character vector, or a cell array
of character vectors, which will be promoted to a categorical array prior
to comparison.

If categorical arrays C1 and C2 are ordinal, they must have
the same set and ordering of categories. If neither are ordinal, the
category names of each pair of elements are compared. Hence, they do not
need to have the same set of categories.

TF = isequaln ( C1 , C2 , &hellip;) returns a
logical scalar TF , which is true , if all input arguments
are equal, and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 99
Return true if categorical arrays are equal under the assumption that undefined elements are equal.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
categorical.ismatrix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 337
categorical: TF = ismatrix ( C )

Return true if categorical array is a 2-D array.

TF = ismatrix ( C ) returns a logical scalar TF ,
which is true , if the categorical array C is a matrix, and
false otherwise. A matrix is an array of any type where
ndims ( X ) == 2 and for which size ( X ) returns
[ H , W ] with non-negative H and W .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Return true if categorical array is a 2-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
categorical.ismember


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1748
categorical: TF = ismember ( A , B )
categorical: TF = ismember ( A , B , 'rows' )
categorical: [ TF , index ] = ismember (&hellip;)
categorical: [ TF , index ] = ismember (&hellip;, 'legacy' )

Find categorical elements in a set.

TF = ismember ( A , B ) returns a logical array
TF of the same size as A containing true for each
corresponding element of A that is in B and false
otherwise. <undefined> elements are not equal with each other
and always return false . If A and B are ordinal,
they must have the same ordered set of categories. If neither A
nor B are ordinal, then this restriction is relaxed and comparison
is performed using the category names. Comparison between an ordinal and
an unordered categorical array is not allowed. Either A or B
may also be a string array, a character vector, or a cell array of
character vectors containing one or multiple category names to compare
against an unordered categorical array.

TF = ismember ( A , B , 'rows' ) only
applies to categorical matrices with the same number of columns, in which
case the logical vector TF contains true for each row of
A that is also a row in B . TF has the same number of
rows as A .

[ TF , index ] = ismember ( A , B ) also returns
an index array of the same size as A containing the lowest index in
B for each element of A that is a member of B and 0
otherwise. If the 'rows' optional argument is used, then the
returning index is a column vector with the same rows as A and it
contains the lowest index in B for each row of A that is a
member of B and 0 otherwise. If the 'legacy' optional
argument is specified, then the highest index of matched elements is
returned. Unless multiple matches exist, the 'legacy' option has
no effect on the returned index .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Find categorical elements in a set.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
categorical.ismissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 801
categorical: out = ismissing ( C )
categorical: out = ismissing ( C , indicator )

Find missing elements in categorical array.

TF = ismissing ( C ) returns a logical array TF
of the same size as C containing true for each
corresponding element of C that does not have a value from one of
the categories in C and false otherwise.

TF = ismissing ( C , indicator ) also returns a
logical array TF containing true for each corresponding
element of C that does not have a value from one of the categories
specified in indicator and false otherwise.

indicator must be either a categorical array or a character vector
or a string vector or a cell vector of character vectors. When the
indicator contains text representation, the comparison is based on
lexicographical equality to the category names of C .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Find missing elements in categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
categorical.isordinal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 200
categorical: TF = isordinal ( C )

Test if categorical array is ordinal.

TF = isordinal ( C ) returns a logical scalar TF ,
which is true , if the categorical array C is ordinal, and
false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Test if categorical array is ordinal.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
categorical.isprotected


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 208
categorical: TF = isprotected ( C )

Test if categorical array is protected.

TF = isprotected ( C ) returns a logical scalar
TF , which is true , if the categorical array C is
protected, and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Test if categorical array is protected.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
categorical.isrow


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 296
categorical: TF = isrow ( C )

Return true if categorical array is a row vector.

TF = isrow ( C ) returns a logical scalar TF ,
which is true , if the categorical array C is a row vector,
and false otherwise. A row vector is a 2-D array for which
size ( X ) returns [1, N ] with non-negative
N .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Return true if categorical array is a row vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
categorical.isscalar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 286
categorical: TF = isscalar ( C )

Return true if categorical array is a scalar.

TF = isscalar ( C ) returns a logical scalar TF ,
which is true , if the categorical array C is also a scalar,
and false otherwise. A scalar is a single element object for
which size ( X ) returns [1, 1] .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Return true if categorical array is a scalar.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
categorical.issorted


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1728
categorical: TF = issorted ( C )
categorical: TF = issorted ( C , dim )
categorical: TF = issorted ( C , direction )
categorical: TF = issorted ( C , dim , direction )
categorical: TF = issorted (&hellip;, 'MissingPlacement' , MP )

Return true if categorical array is sorted.

TF = issorted ( C ) returns a logical scalar TF ,
which is true , if the categorical array C is sorted in
ascending order, and false otherwise.

TF = issorted ( C , dim ) returns a logical scalar
TF , which is true , if the categorical array C is
sorted in ascending order along the dimension dim , and
false otherwise.

TF = issorted ( A , direction ) returns a logical
scalar TF , which is true , if the categorical array C
is sorted in the direction specified by direction , and
false otherwise. direction can be one of the following
options:

'ascend' , which is the default, checks is elements are in
ascending order.
'descend' checks if elements are in descending order.
'monotonic' checks if elements are either in ascending or
descending order.
'strictascend' checks if elements are in ascending order
and there are no duplicate or undefined elements.
'strictdescend' checks if elements are in descending order
and there are no duplicate or undefined elements.
'strictmonotonic' checks if elements are either in
ascending or descending order and there are no duplicate or undefined
elements.

TF = issorted (&hellip;, 'MissingPlacement' ,
MP ) specifies where missing elements ( <undefined> ) are
placed with
one of the following options specified in MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Return true if categorical array is sorted.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
categorical.issortedrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2568
categorical: TF = issortedrows ( C )
categorical: TF = issortedrows ( C , col )
categorical: TF = issortedrows ( C , direction )
categorical: TF = issortedrows ( C , col , direction )
categorical: TF = issortedrows (&hellip;, 'MissingPlacement' , MP )

Return true if categorical matrix rows are sorted.

TF = issortedrows ( C ) returns a logical scalar
TF , which is true , if the rows in the 2-D categorical array
C are sorted in ascending order, and false otherwise.

TF = issortedrows ( C , col ) returns a logical
scalar TF , which is true , if the categorical array C
is sorted according to the columns specified by the vector col , and
false otherwise. col must explicitly contain non-zero
integers whose absolute values index existing columns in C .
Positive elements sort the corresponding columns in ascending order,
while negative elements sort the corresponding columns in descending
order.

TF = issortedrows ( C , direction ) checks if the
rows in C are sorted according to the specified direction, which
can be one of the following options:

'ascend' , which is the default, checks is elements are in
ascending order.
'descend' checks if elements are in descending order.
'monotonic' checks if elements are either in ascending or
descending order.
'strictascend' checks if elements are in ascending order
and there are no duplicate or undefined elements.
'strictdescend' checks if elements are in descending order
and there are no duplicate or undefined elements.
'strictmonotonic' checks if elements are either in
ascending or descending order and there are no duplicate or undefined
elements.

Alternatively, direction can be a cell array of character
vectors specifying the sorting direction for each individual column of
C , in which case the number of elements in direction must
equal the number of columns in C .

TF = issortedrows ( C , col , direction )
checks if the rows in the categorical array C are sorted according
to the columns specified in col using the corresponding sorting
direction specified in direction . In this case, the sign of the
values in col is ignored. col and direction must have
the same length, but not necessarily the same number of elements as the
columns in C .

TF = issortedrows (&hellip;, 'MissingPlacement' ,
MP ) specifies where missing elements ( <undefined> ) are
placed with one of the following options specified in MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Return true if categorical matrix rows are sorted.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
categorical.isundefined


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 348
categorical: out = isundefined ( C )

Test for undefined elements in categorical array.

TF = isundefined ( C ) returns a logical array TF
of the same size as C containing true for each
corresponding element of C that does not have a value from one of
the categories in C and false otherwise.
<undefined> is the equivalent of NaN in numeric arrays.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Test for undefined elements in categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
categorical.isvector


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 350
categorical: TF = isvector ( C )

Return true if categorical array is a vector.

TF = isvector ( C ) returns a logical scalar TF ,
which is true if the categorical array C is a vector and
false otherwise. A vector is a 2-D array for which one of the
dimensions is equal to 1 (either 1&times;N or N&times;1 ). By
definition, a scalar is also a vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Return true if categorical array is a vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.keyHash


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1317
categorical: key = keyHash ( C )
categorical: key = keyHash ( C , base )

Generate a hash code for a categorical array.

key = keyHash ( C ) generates a uint64 scalar
that represents the input array C . keyHash utilizes the
64-bit FNV-1a variant of the Fowler-Noll-Vo non-cryptographic hash
function.

key = keyHash ( C , base ) also generates a 64-bit
hash code using base as the offset basis for the FNV-1a hash
algorithm. base must be a uint64 integer type scalar. Use
this syntax to cascade keyHash on multiple objects for which a
single hash code is required.

A categorical array is keyed on its element labels, on its ordinality,
and &ndash; for an ordinal array alone &ndash; on the order of its categories,
which is what its comparisons mean. Neither the Protected
property nor a non-ordinal array&rsquo;s category list is part of the key, so
two non-ordinal arrays carrying the same labels hash alike however
their categories differ or are ordered. Undefined elements are equal
to one another and distinct from every category. Two arrays that
keyMatch reports as the same key always hash alike.

Note that unlike MATLAB, this implementation does not use any random
seed. As a result, keyHash will always generate the exact same
hash key for any particular input across different workers and Octave
sessions.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Generate a hash code for a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
categorical.le


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1228
categorical: TF = le ( A , B )

Less than or equal to for ordinal categorical arrays.

TF = le ( A , B ) is the equivalent of the syntax
TF = A <= B and returns a logical array of the
same size as the largest input with its elements set to true
where the corresponding elements of A are less than or equal to
B and set to false where they are not. A and B
must be size compatible, which translates to they can be the same size,
one can be scalar, or for every dimension, their dimension sizes must be
equal or one of them must be 1.

If categorical arrays A and B are both ordinal, they must
have the same set and ordering of categories. Unordered categorical
arrays cannot be compared for less than or equal to inequality.

One of the input arguments can also be a character vector, a cellstr
scalar or a string scalar as long as the other is a categorical array.
In this case, a logical array of the same size as the categorical array
is returned in which every element is tested for less than or equal to
inequality by comparing its category with that specified by the string
argument.

Undefined elements always return false , since they are not
comparable to any other categorical values including other undefined
elements.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Less than or equal to for ordinal categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
categorical.length


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 235
categorical: N = length ( C )

Length of a categorical vector.

N = length ( C ) returns the size of the longest
dimension of the categorical array C , unless any of its dimensions
has zero length, in which case length ( C ) returns 0.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Length of a categorical vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
categorical.lt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1179
categorical: TF = lt ( A , B )

Less than for ordinal categorical arrays.

TF = lt ( A , B ) is the equivalent of the syntax
TF = A < B and returns a logical array of the
same size as the largest input with its elements set to true
where the corresponding elements of A are less than B and
set to false where they are not. A and B must be
size compatible, which translates to they can be the same size, one can
be scalar, or for every dimension, their dimension sizes must be equal or
one of them must be 1.

If categorical arrays A and B are both ordinal, they must
have the same set and ordering of categories. Unordered categorical
arrays cannot be compared for less than inequality.

One of the input arguments can also be a character vector, a cellstr
scalar or a string scalar as long as the other is a categorical array.
In this case, a logical array of the same size as the categorical array
is returned in which every element is tested for less than inequality
by comparing its category with that specified by the string argument.

Undefined elements always return false , since they are not
comparable to any other categorical values including other undefined
elements.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Less than for ordinal categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
categorical.max


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2671
categorical: C = max ( A )
categorical: [ C , index ] = max ( A )
categorical: C = max ( A , [] , dim )
categorical: C = max ( A , [] , vecdim )
categorical: C = max ( A , [] , 'all' )
categorical: [ C , index ] = max ( A , [] , 'linear' )
categorical: [ C , index ] = max ( A , [] , &hellip;, 'linear' )
categorical: C = max ( A , B )
categorical: [&hellip;] = max (&hellip;, missingflag )

Largest elements in ordinal categorical arrays.

C = max ( A ) returns the largest element in ordinal
categorical vector A . If A is a matrix, max ( A )
returns a row vector with the largest element from each column. For
multidimensional arrays, max ( A ) operates along the first
non-singleton dimension.

[ C , index ] = max ( A ) also returns the indices of
the maximum values in index , which has the same size as C .
When the operating dimension contains more than one maximal elements, the
index of the first one is returned.

C = max ( A , [] , dim ) operates along the
dimension specified by dim .

C = max ( A , [] , vecdim ) operates on all
the elements contained in the dimensions specified by vecdim , which
must be a numeric vector of non-repeating positive integers. Any values
in vecdim indexing dimensions larger that the actual array A
are ignored.

C = max ( A , [] , 'all' ) operates on all
dimensions and returns the largest element in A .

[ C , index ] = max ( A , [] , &hellip;) also
returns the first index of the maximum values in index . The second
output is only valid when max operates on a single input array.
Setting the 'linear' flag returns the linear index to the
corresponding maximum values in A .

C = max ( A , B ) returns an ordinal categorical
array C with the largest elements from A and B , which
both must be ordinal categorical arrays of compatible sizes with the same
set and ordering of categories. Compatible size means that A and
B can be the same size, one can be scalar, or for every dimension,
their dimension sizes must be equal or one of them must be 1.

[&hellip;] = max (&hellip;, missingflag ) specifies how to
handle undefined elements in any of the previous syntaxes.
missingflag must be a character vector or a string scalar with one
of the following values:

'omitundefined' , which is the default, ignores all
undefined elements and returns the maximum of the remaining elements. If
all elements along the operating dimension are undefined, then it returns
an undefined element. 'omitnan' may also be used as equivalent
to 'omitundefined' .
'includeundefined' returns an undefined element if there
any undefined elements along the operating dimension.
'includenan' may also be used as equivalent to
'includeundefined' .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Largest elements in ordinal categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
categorical.maxk


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1385
categorical: B = maxk ( A , K )
categorical: B = maxk ( A , K , dim )
categorical: [ B , index ] = maxk ( A , &hellip;)

Find the largest elements in an ordinal categorical array.

B = maxk ( A , K ) returns the K largest
elements of the categorical array A in descending order. A
must be ordinal, since the elements are ranked by the order of their
categories. If A is a vector, then B is a vector with
K elements. If A is a matrix, then maxk operates
along each column of A and B has K rows. For
multidimensional arrays, maxk operates along the first
non-singleton dimension. B keeps the categories of A ,
including their order.

B = maxk ( A , K , dim ) operates along the
dimension specified by dim .

K must be a nonnegative integer scalar. If K is larger than
the number of elements along the operating dimension, then all of them
are returned.

Missing elements ( <undefined> ) are not ranked. They are appended
after the ranked elements in their original order, and hence they only
appear in B when K exceeds the number of defined elements
along the operating dimension. Unlike sort , maxk has no
'MissingPlacement' option, since undefined elements are always
placed last. Elements comparing as equal keep their original order.

[ B , index ] = maxk ( A , &hellip;) also returns an
index array containing the indices of the returned elements of A
along the operating dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Find the largest elements in an ordinal categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
categorical.median


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1885
categorical: B = median ( A )
categorical: B = median ( A , dim )
categorical: B = median ( A , vecdim )
categorical: B = median ( A , 'all' )
categorical: B = median (&hellip;, missingflag )

Median value of an ordinal categorical array.

B = median ( A ) returns the median of the elements in
ordinal categorical vector A . If A is a matrix,
median ( A ) returns a row vector with the median element
from each column. For multidimensional arrays, median ( A )
operates along the first non-singleton dimension. B is also
ordinal with the same ordered categories as A . For even number of
elements along the operating dimension, the returned median value is
either the midway category between the two middle elements or the larger
of the two categories midway between the two middle elements.

B = median ( A , dim ) operates along the dimension
specified by dim .

B = median ( A , vecdim ) operates on all the
elements contained in the dimensions specified by vecdim , which
must be a numeric vector of non-repeating positive integers. Any values
in vecdim indexing dimensions larger that the actual array A
are ignored.

C = median ( A , [] , 'all' ) operates on
all dimensions and returns the median element in A .

C = median (&hellip;, missingflag ) specifies how to
handle undefined elements in any of the previous syntaxes.
missingflag must be a character vector or a string scalar with one
of the following values:

'omitundefined' ignores all undefined elements and returns
the median of the remaining elements. If all elements along the
operating dimension are undefined, then it returns an undefined element.
'omitnan' may also be used as equivalent to
'omitundefined' .
'includeundefined' , which is the default, returns an
undefined element if there any undefined elements along the operating
dimension. 'includenan' may also be used as equivalent to
'includeundefined' .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Median value of an ordinal categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
categorical.mergecats


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 962
categorical: B = mergecats ( A , oldcats )
categorical: B = mergecats ( A , oldcats , newcat )

Merge categories in categorical array.

B = mergecats ( A , oldcats ) merges two or more
categories specified by oldcats into a single category with the
same name as oldcats (1) . In case of ordinal categorical
arrays, the categories listed in oldcats must be in consecutive
order. All elements of A corresponding to the categories listed in
oldcats are re-indexed to correspond to oldcats (1) in
B .

B = mergecats ( A , oldcats , newcat ) merges
the categories listed in oldcats into a single new category named
as specified by newcat .

newcat must be either a character vector, a cellstr scalar or a
string scalar. oldcats can be string array, a cell array of
character vectors, or any type of array that can be converted to a cell
array of character vectors with the cellstr function. Any names
in oldcats that do not reference an existing category are ignored.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Merge categories in categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
categorical.min


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2680
categorical: C = min ( A )
categorical: [ C , index ] = min ( A )
categorical: C = min ( A , [] , dim )
categorical: C = min ( A , [] , vecdim )
categorical: C = min ( A , [] , 'all' )
categorical: [ C , index ] = min ( A , [] , 'linear' )
categorical: [ C , index ] = min ( A , [] , &hellip;, 'linear' )
categorical: C = min ( A , B )
categorical: [&hellip;] = min (&hellip;, missingflag )

Smallest elements in ordinal categorical arrays.

C = min ( A ) returns the smallest element in ordinal
categorical vector A . If A is a matrix, min ( A )
returns a row vector with the smallest element from each column. For
multidimensional arrays, min ( A ) operates along the first
non-singleton dimension.

[ C , index ] = min ( A ) also returns the indices of
the minimum values in index , which has the same size as C .
When the operating dimension contains more than one minimal elements, the
index of the first one is returned.

C = min ( A , [] , dim ) operates along the
dimension specified by dim .

C = min ( A , [] , vecdim ) operates on all
the elements contained in the dimensions specified by vecdim , which
must be a numeric vector of non-repeating positive integers. Any values
in vecdim indexing dimensions larger that the actual array A
are ignored.

C = min ( A , [] , 'all' ) operates on all
dimensions and returns the smallest element in A .

[ C , index ] = min ( A , [] , &hellip;) also
returns the first index of the minimum values in index . The second
output is only valid when min operates on a single input array.
Setting the 'linear' flag returns the linear index to the
corresponding minimum values in A .

C = min ( A , B ) returns an ordinal categorical
array C with the smallest elements from A and B , which
both must be ordinal categorical arrays of compatible sizes with the same
set and ordering of categories. Compatible size means that A and
B can be the same size, one can be scalar, or for every dimension,
their dimension sizes must be equal or one of them must be 1.

[&hellip;] = min (&hellip;, missingflag ) specifies how to
handle undefined elements in any of the previous syntaxes.
missingflag must be a character vector or a string scalar with one
of the following values:

'omitundefined' , which is the default, ignores all
undefined elements and returns the minimum of the remaining elements.
If all elements along the operating dimension are undefined, then it
returns an undefined element. 'omitnan' can also be used as
equivalent to 'omitundefined' .
'includeundefined' returns an undefined element if there
are any undefined elements along the operating dimension.
'includenan' can also be used as equivalent to
'includeundefined' .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Smallest elements in ordinal categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
categorical.mink


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1386
categorical: B = mink ( A , K )
categorical: B = mink ( A , K , dim )
categorical: [ B , index ] = mink ( A , &hellip;)

Find the smallest elements in an ordinal categorical array.

B = mink ( A , K ) returns the K smallest
elements of the categorical array A in ascending order. A
must be ordinal, since the elements are ranked by the order of their
categories. If A is a vector, then B is a vector with
K elements. If A is a matrix, then mink operates
along each column of A and B has K rows. For
multidimensional arrays, mink operates along the first
non-singleton dimension. B keeps the categories of A ,
including their order.

B = mink ( A , K , dim ) operates along the
dimension specified by dim .

K must be a nonnegative integer scalar. If K is larger than
the number of elements along the operating dimension, then all of them
are returned.

Missing elements ( <undefined> ) are not ranked. They are appended
after the ranked elements in their original order, and hence they only
appear in B when K exceeds the number of defined elements
along the operating dimension. Unlike sort , mink has no
'MissingPlacement' option, since undefined elements are always
placed last. Elements comparing as equal keep their original order.

[ B , index ] = mink ( A , &hellip;) also returns an
index array containing the indices of the returned elements of A
along the operating dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
Find the smallest elements in an ordinal categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
categorical.mode


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1579
categorical: M = mode ( A )
categorical: [ M , F ] = mode ( A )
categorical: [ M , F , C ] = mode ( A )
categorical: [&hellip;] = mode ( A , dim )
categorical: [&hellip;] = mode ( A , vecdim )
categorical: [&hellip;] = mode ( A , 'all' )

Most frequent element in a categorical array.

M = mode ( A ) returns the most frequent element in the
categorical vector A . If A is a matrix,
mode ( A ) returns a row vector with the most frequent element
from each column. For multidimensional arrays, mode ( A )
operates along the first non-singleton dimension. B is also a
categorical array with the same categories as A . For multiple
elements with the same maximum frequency along the operating dimension,
the element from the category that occurs first in A is returned.

[ M , F ] = mode ( A ) also returns a numeric array
F , which has the same size as M and it contains the number of
occurrences of each corresponding element of M .

[ M , F , C ] = mode ( A ) also returns a cell
array C , which has the same size as M and each element is a
sorted categorical vector of all the values with the same maximum
frequency of the corresponding element of M .

B = mode ( A , dim ) operates along the dimension
specified by dim .

B = mode ( A , vecdim ) operates on all the
elements contained in the dimensions specified by vecdim , which
must be a numeric vector of non-repeating positive integers. Any values
in vecdim indexing dimensions larger that the actual array A
are ignored.

C = mode ( A , [] , 'all' ) operates on
all dimensions and returns the most frequent element in A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Most frequent element in a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
categorical.ndims


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 157
categorical: out = ndims ( C )

Number of dimensions in a categorical array.

out = ndims ( C ) returns the number of dimensions of
the categorical array C .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Number of dimensions in a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
categorical.ne


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1230
categorical: TF = ne ( A , B )

Not equal for categorical arrays.

TF = ne ( A , B ) is the equivalent of the syntax
TF = A != B and returns a logical array of the
same size as the largest input with its elements set to true
where the corresponding elements of A and B are not equal and
set to false where they are equal. A and B must be
size compatible, which translates to they can be the same size, one can
be scalar, or for every dimension, their dimension sizes must be equal or
one of them must be 1.

If categorical arrays A and B are ordinal, they must have
the same set and ordering of categories. If neither are ordinal, the
category names of each pair of elements are compared. Hence, they do
not need to have the same set of categories.

One of the input arguments can also be a character vector, a cellstr
scalar or a string scalar as long as the other is a categorical array.
In this case, a logical array of the same size as the categorical array
is returned in which every element is tested for inequality by comparing
its category with that specified by the string argument.

Undefined elements always return true , since they are not
comparable to any other categorical values including other undefined
elements.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Not equal for categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
categorical.numel


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 159
categorical: out = numel ( C )

Total number of elements in a categorical array.

out = numel ( C ) returns the number of elements in the
categorical array C .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Total number of elements in a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.permute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 450
categorical: B = permute ( A , dims )

Generalized transpose for a categorical N-D array.

B = permute ( A , dims ) returns the generalized
transpose of the categorical array A by rearranging its dimensions
according to the permutation vector specified in dims .

dims must index all the dimensions 1:ndims ( A ) of the
input array A , in any order, but only once. The N th
dimension of A gets remapped to the dimension in B specified
by dims ( N ) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Generalized transpose for a categorical N-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
categorical.removecats


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 791
categorical: B = removecats ( A )
categorical: B = removecats ( A , oldcats )

Remove categories from categorical array.

B = removecats ( A ) removes all unused categories from
categorical array A . The output categorical array B has the
same size and values as A , but potentially fewer categories.

B = removecats ( A , oldcats ) removes the
categories specified by oldcats . The elements of B that
correspond to the removed categories are undefined.

oldcats can be a string array, a cell array of character vectors,
or any type of array that can be converted to a cell array of character
vectors with the cellstr function. Any names in oldcats
that do not reference an existing category are ignored.

When removing a single category, oldcats can also be specified as a
character vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Remove categories from categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
categorical.renamecats


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1082
categorical: B = renamecats ( A , newnames )
categorical: B = renamecats ( A , oldnames , newnames )

Rename categories in categorical array.

B = renamecats ( A , newnames ) renames all the
categories in A , without changing any of its values, with the names
specified in newnames . newnames can be specified as a string
array, a cell array of character vectors, or any type of array that can
be converted to a cell array of character vectors with the cellstr
function, as long as it has the same number of elements as the categories
in A .

B = renamecats ( A , oldnames , newnames )
renames the categories of A specified in oldnames with the
names specified in newnames . Both oldnames and
newnames can be a string array, a cell array of character vectors,
or any type of array that can be converted to a cell array of character
vectors with the cellstr function, as long as they have the same
number of elements. oldnames must specify a subset of existing
categories in A .

When renaming a single category, both oldnames and newnames
can also be specified as character vectors.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Rename categories in categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
categorical.reordercats


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 606
categorical: B = reordercats ( A )
categorical: B = reordercats ( A , neworder )

Reorder categories in categorical array.

B = reordercats ( A ) reorders the categories of A
in alphanumeric order.

B = reordercats ( A , neworder ) reorders the
categories of A according to the order specified by neworder ,
which must define a permutation of categories ( A ) .

neworder can be a numeric vector, a string array, a cell array of
character vectors, or any type of array that can be converted to a cell
array of character vectors with the cellstr function as long as it
indexes all existing categories in A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Reorder categories in categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.repelem


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 981
categorical: B = repelem ( A , n )
categorical: B = repelem ( A , d1 , &hellip;, dN )

Repeat copies of categorical array elements.

B = repelem ( A , n ) returns a categorical vector
B containing repeated elements of the input A , which must be
a categorical vector. If n is a scalar, each element of A is
repeated n times along the non-singleton dimension of A . If
n is a vector, it must have the same elements as A , in which
case it specifies the number of times to repeat each corresponding
element of A .

B = repelem ( A , d1 , &hellip;, dN ) returns
an array B with each element of A repeated according to the
the list of input arguments d1 , &hellip;, dN each
corresponding to a different dimension 1:ndims ( A ) of the
input array A . d1 , &hellip;, dN must be either scalars
or vectors with the same length as the corresponding dimension of
A containing non-negative integer values specifying the number of
repetitions of each element along the corresponding dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Repeat copies of categorical array elements.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
categorical.repelems


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 473
categorical: B = repelems ( A , R )

Construct a vector of repeated elements from a categorical array.

B = repelems ( A , R ) returns a categorical vector
B containing repeated elements of the input A , which must be
a categorical vector. R must be a 2&times;N matrix of integers.
Entries in the first row of R correspond to the linear indexing of
the elements in A to be repeated. The corresponding entries in the
second row of R specify the repeat count of each element.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Construct a vector of repeated elements from a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
categorical.repmat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 628
categorical: B = repmat ( A , n )
categorical: B = repmat ( A , d1 , &hellip;, dN )
categorical: B = repmat ( A , dimvec )

Repeat copies of a categorical array.

B = repmat ( A , n ) returns a categorical array
B containing n copies of the input categorical array A
along every dimension of A .

B = repmat ( A , d1 , &hellip;, dN ) returns an
array B containing copies of A along the dimensions specified
by the list of scalar integer values d1 , &hellip;, dN , which
specify how many copies of A are made in each dimension.

B = repmat ( A , dimvec ) is equivalent to the
previous syntax with dimvec = [ d1 , &hellip;, dN ] .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Repeat copies of a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.reshape


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 791
categorical: B = reshape ( A , d1 , &hellip;, dN )
categorical: B = reshape ( A , &hellip;, [] , &hellip;)
categorical: B = reshape ( A , dimvec )

Repeat copies of categorical array elements.

B = reshape ( A , d1 , &hellip;, dN ) returns a
categorical array B with specified dimensions d1 , &hellip;,
dN , whose elements are taken columnwise from the categorical array
A . The product of d1 , &hellip;, dN must equal the total
number of elements in A .

B = reshape ( A , &hellip;, [] , &hellip;) returns
a categorical array B with one dimension unspecified which is
calculated automatically so that the product of dimensions in B
matches the total elements in A , which must be divisible the
product of specified dimensions. An empty matrix ([]) is used to
flag the unspecified dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Repeat copies of categorical array elements.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.setcats


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 893
categorical: B = setcats ( A , newcats )

Set categories in categorical array.

B = setcats ( A , newcats ) sets categories in the
categorical array B according to the elements of the input array
A and the categories specified by newcats according to the
following rules:

Any element of A that corresponds to a category listed in
newcats is copied to B with the same categorical value.
Any categories of A not listed in newcats are not
copied to B and the corresponding elements of B are
undefined.
New categories listed in newcats that are not present in
A are added in B , but without any elements equal to these
new categories.

newcats can be a string array, a cell array of character vectors
or any type of array that can be converted to a cell array of character
vectors with the cellstr function. When setting a single new
category, newcats can also be specified as a character vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Set categories in categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.setdiff


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1563
categorical: C = setdiff ( A , B )
categorical: C = setdiff ( A , B , 'rows' )
categorical: [ C , ixA ] = setdiff (&hellip;)
categorical: &hellip; = setdiff (&hellip;, order )

Set difference of two categorical arrays.

C = setdiff ( A , B ) returns the unique common
values of the categorical arrays A and B . Either A or
B input arguments may be a character vector, a string array, or a
cell array of character vectors, which is promoted to a categorical array
prior to set difference. If both A and B are row vectors,
then C is also a row vector, otherwise intersect returns a
column vector.

If categorical arrays A and B are ordinal, they must have
the same set and ordering of categories, which is transfered to C .
If neither are ordinal, the category names of each pair of elements are
compared (they do not need to have the same set of categories) in which
case the categories in C are the sorted union of the categories in
A and B .

C = setdiff ( A , B , 'rows' returns the
unique common rows of the categorical matrices A and B , which
must have the same number of columns. By default, the rows in
categorical matrix C are in sorted order.

[ C , ixA ] = setdiff (&hellip;) also returns the index
vector ixA such that C = A ( ixA ) , unless
the 'rows' optional argument is given, in which case
C = A ( ixA ,:) .

&hellip; = setdiff (&hellip;, order ) also specifies the
order of the returned unique values. order may be either
'sorted' , which is the default behavior, or 'stable' ,
in which case the unique values are returned in order of appearance.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Set difference of two categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
categorical.setxor


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1611
categorical: C = setxor ( A , B )
categorical: C = setxor ( A , B , 'rows' )
categorical: [ C , ixA , ixB ] = setxor (&hellip;)
categorical: &hellip; = setxor (&hellip;, order )

Set exclusive-or of two categorical arrays.

C = setxor ( A , B ) returns the unique common
values of the categorical arrays A and B . Either A or
B input arguments may be a character vector, a string array, or a
cell array of character vectors, which is promoted to a categorical array
prior to set exclusive-or. If both A and B are row vectors,
then C is also a row vector, otherwise setxor returns a
column vector.

If categorical arrays A and B are ordinal, they must have
the same set and ordering of categories, which is transfered to C .
If neither are ordinal, the category names of each pair of elements are
compared (they do not need to have the same set of categories) in which
case the categories in C are the sorted union of the categories in
A and B .

C = setxor ( A , B , 'rows' returns the
unique common rows of the categorical matrices A and B , which
must have the same number of columns. By default, the rows in
categorical matrix C are in sorted order.

[ C , ixA , ixB ] = setxor (&hellip;) also returns
index vectors ixA and ixB such that
C = A ( ixA ) and
C = B ( ixB ) , unless the 'rows' optional
argument is given, in which case C = A ( ixA ,:)
and C = B ( ixB ,:) .

&hellip; = setxor (&hellip;, order ) also specifies the
order of the returned unique values. order may be either
'sorted' , which is the default behavior, or 'stable' ,
in which case the unique values are returned in order of appearance.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Set exclusive-or of two categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
categorical.single


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 216
categorical: out = single ( C )

Convert categorical array to a single array.

out = single ( C ) returns a single array indexing the
categories in C . Categorical elements of undefined category are
returned as NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Convert categorical array to a single array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
categorical.size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1078
categorical: sz = size ( C )
categorical: dim_sz = size ( C , dim )
categorical: dim_sz = size ( C , d1 , d2 , &hellip;)
categorical: [ rows , columns , &hellip;, dim_n_sz ] = size (&hellip;)

Size of a categorical array.

sz = size ( C ) returns a row vector with the size
(number of elements) of each dimension for the categorical array C .

dim_sz = size ( C , dim ) returns the size of
the corresponding dimension specified in dim . If dim is a
vector, then dim_sz is a vector of the same length and with each
element corresponding to a specified dimension. Multiple dimensions may
also be specified as separate arguments.

With a single output argument, size returns a row vector. With
several, the size of dimension N is returned in the Nth argument.
Asking for fewer output arguments than the array has dimensions folds
the trailing dimensions into the last one, so [r, c] = size
( C ) on a 2-by-2-by-2 array returns 2 and 4; asking for more pads
with ones. When a dimension is named, however, the number of output
arguments must equal the number of dimensions requested.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Size of a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
categorical.sort


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1570
categorical: B = sort ( A )
categorical: B = sort ( A , dim )
categorical: B = sort ( A , direction )
categorical: B = sort ( A , dim , direction )
categorical: B = sort (&hellip;, 'MissingPlacement' , MP )
categorical: [ B , index ] = sort ( A , &hellip;)

Sort elements in a categorical array.

B = sort ( A ) sorts the categorical array A in
ascending order. The sorted array B has the same categories as
A . If A is a matrix, sort ( A ) sorts each column
of A in ascending order. For multidimensional arrays,
mode ( A ) sorts along the first non-singleton dimension.

B = sort ( A , dim ) sorts along the dimension
specified by dim .

B = sort ( A , direction ) also specifies the
sorting direction, which can be either 'ascend' (default) or
'descend' .

B = sort (&hellip;, 'MissingPlacement' , MP )
specifies where to place the missing elements ( <undefined> )
returned in B with any of the following options specified in
MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.

[ B , index ] = sort ( A , &hellip;) also returns a
sorting index containing the original indices of the elements in the
sorted array.

If A is a vector, then index contains the original
linear indices of the elements in the sorted vector B such that
B = A ( index ) .
If A is an M&times;N matrix and dim = 1 , then
index contains the original row indices of the elements in the
sorted vector B such that for j = 1:N ,
B (:,j) = A ( index (:,j),j) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Sort elements in a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
categorical.sortrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2051
categorical: B = sortrows ( A )
categorical: B = sortrows ( A , col )
categorical: B = sortrows ( A , direction )
categorical: B = sortrows ( A , col , direction )
categorical: B = sortrows (&hellip;, 'MissingPlacement' , MP )
categorical: [ B , index ] = sortrows ( A , &hellip;)

Sort rows in a categorical array.

B = sortrows ( A ) sorts the rows of the 2-D categorical
array A in ascending order. The sorted array B has the same
categories as A .

B = sortrows ( A , col ) sorts A according to
to the columns specified by the numeric vector col , which must
explicitly contain non-zero integers whose absolute values index existing
columns in A . Positive elements sort the corresponding columns in
ascending order, while negative elements sort the corresponding columns
in descending order.

B = sortrows ( A , direction ) also specifies the
sorting direction, which can be either 'ascend' (default) or
'descend' applying to all columns in A . Alternatively,
direction can be a cell array of character vectors specifying
the sorting direction for each individual column of A , in which
case the number of elements in direction must equal the number of
columns in A .

B = sortrows ( A , col , direction ) sorts the
categorical array A according to the columns specified in col
using the corresponding sorting direction specified in direction .
In this case, the sign of the values in col is ignored. col
and direction must have the same length, but not necessarily the
same number of elements as the columns in A .

B = sortrows (&hellip;, 'MissingPlacement' , MP )
specifies where to place the missing elements ( <undefined> )
returned in B with any of the following options specified in
MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.

[ B , index ] = sortrows ( A , &hellip;) also returns
an index vector containing the original row indices of A in the
sorted matrix B such that B = A ( index ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Sort rows in a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.summary


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 373
categorical: summary ( C )
categorical: summary ( C , dim )
categorical: summary (&hellip;, Name , Value )
categorical: s = summary (&hellip;)

Display summary of categorical array.

summary ( C ) displays the number of elements in the
categorical array C that are equal to each category of C .
Any undefined elements in C are summed together and displayed as
<undefined> .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Display summary of categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
categorical.times


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 423
categorical: C = times ( A , B )

Combine categorical arrays.

C = times ( A , B ) is the equivalent of the syntax
C = A .* B and returns a categorical array whose
categories are the Cartesian product of the categories in A and
B and each element is indexed to a new category which is the
combination of the categories of the corresponding elements in A
and B .

A and B must be of common size or scalar categorical arrays.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Combine categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
categorical.topkrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2622
categorical: B = topkrows ( A , K )
categorical: B = topkrows ( A , K , col )
categorical: B = topkrows ( A , K , direction )
categorical: B = topkrows ( A , K , col , direction )

Top K sorted rows of categorical array.

B = topkrows ( A , K ) returns the top K rows
of the 2-D categorical array A sorted in descending order as a
group. K must be a nonnegative integer scalar. If K is
larger than the number of rows in A , then all of them are returned.
B keeps the categories of A , including their order.

Missing elements ( <undefined> ) are not ranked. Within each sort
column they are placed after the elements that are defined, whichever
direction is asked for, so a row is demoted only by a missing element in
a column that actually decides its position. Rows comparing as equal
keep their original order.

B = topkrows ( A , K , col ) returns the top
K rows of the 2-D categorical array A sorted according to the
columns specified by the numeric vector col , which must contain
positive integers indexing existing columns in A . Columns are used
as sort keys in the order given, and those not listed are not used at
all. The direction is descending unless direction says otherwise.

B = topkrows ( A , K , direction ) returns the
top K rows of the 2-D categorical array A sorted according to
direction , which can be either 'descend' (default) or
'ascend' applying to all columns in A . Alternatively,
direction can be a cell array of character vectors specifying
the sorting direction for each individual column of A , in which
case the number of elements in direction must equal the number of
columns in A .

B = topkrows ( A , K , col , direction )
returns the top K rows of the 2-D categorical array A sorted
according to the columns specified in col using the corresponding
sorting direction specified in direction . col and
direction must have the same length, but not necessarily the same
number of elements as the columns in A .

B = topkrows (&hellip;, 'MissingPlacement' , MP )
specifies where the missing elements ( <undefined> ) are placed
within each sort column, with any of the following options specified in
MP :

'last' , which is the default, places missing elements last
whichever direction is asked for.
'first' places missing elements first.
'auto' places missing elements last for an ascending sort
and first for a descending one, as sortrows does.

This is an Octave extension: MATLAB has no such option here and always
ranks as 'last' does.

[ B , index ] = topkrows ( A , &hellip;) also returns
an index vector containing the original row indices of A in
B , such that B = A ( index ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Top K sorted rows of categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
categorical.transpose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 183
categorical: B = transpose ( A )

Transpose a categorical matrix.

B = transpose ( A ) is the equivalent of the syntax
B = A .' and returns the transpose of the categorical
matrix A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Transpose a categorical matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
categorical.uint16


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 214
categorical: out = uint16 ( C )

Convert categorical array to a uint16 array.

out = uint16 ( C ) returns a uint16 array
indexing the categories in C . Categorical elements of undefined
category are returned as 0 .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Convert categorical array to a uint16 array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
categorical.uint32


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 214
categorical: out = uint32 ( C )

Convert categorical array to a uint32 array.

out = uint32 ( C ) returns a uint32 array
indexing the categories in C . Categorical elements of undefined
category are returned as 0 .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Convert categorical array to a uint32 array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
categorical.uint64


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 214
categorical: out = uint64 ( C )

Convert categorical array to a uint64 array.

out = uint64 ( C ) returns a uint64 array
indexing the categories in C . Categorical elements of undefined
category are returned as 0 .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Convert categorical array to a uint64 array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
categorical.uint8


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 294
categorical: out = uint8 ( C )

Convert categorical array to a int8 array.

out = uint8 ( C ) returns a uint8 array
indexing the categories in C . Categorical elements of undefined
category are returned as 0 . Note that the returned category
indices saturate to intmax ('uint8') , which is 255.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Convert categorical array to a int8 array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
categorical.union


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1595
categorical: C = union ( A , B )
categorical: C = union ( A , B , 'rows' )
categorical: [ C , ixA , ixB ] = union (&hellip;)
categorical: &hellip; = union (&hellip;, order )

Set union of two categorical arrays.

C = union ( A , B ) returns the unique common
values of the categorical arrays A and B . Either A or
B input arguments may be a character vector, a string array, or a
cell array of character vectors, which is promoted to a categorical array
prior to set exclusive-or. If both A and B are row vectors,
then C is also a row vector, otherwise union returns a
column vector.

If categorical arrays A and B are ordinal, they must have
the same set and ordering of categories, which is transfered to C .
If neither are ordinal, the category names of each pair of elements are
compared (they do not need to have the same set of categories) in which
case the categories in C are the sorted union of the categories in
A and B .

C = union ( A , B , 'rows' returns the
unique common rows of the categorical matrices A and B , which
must have the same number of columns. By default, the rows in
categorical matrix C are in sorted order.

[ C , ixA , ixB ] = union (&hellip;) also returns
index vectors ixA and ixB such that
C = A ( ixA ) and
C = B ( ixB ) , unless the 'rows' optional
argument is given, in which case C = A ( ixA ,:)
and C = B ( ixB ,:) .

&hellip; = union (&hellip;, order ) also specifies the
order of the returned unique values. order may be either
'sorted' , which is the default behavior, or 'stable' ,
in which case the unique values are returned in order of appearance.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Set union of two categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
categorical.unique


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2093
categorical: B = unique ( A )
categorical: B = unique ( A , setOrder )
categorical: B = unique ( A , occurrence )
categorical: B = unique ( A , setOrder , occurrence )
categorical: B = unique ( A , occurrence , setOrder )
categorical: B = unique ( A , &hellip;, 'rows' )
categorical: [ B , ixA , ixB ] = unique (&hellip;)

Unique values in a categorical array.

B = unique ( A ) returns the unique values of the
categorical array A in the categorical vector B sorted
according to the order of categories in A . B retains the
same categories as A . If A is a row vector, then B
is also a row vector, otherwise unique returns a column vector.

B = unique ( A , setOrder ) returns the unique
values of the categorical array A in an order as specified by
setOrder , which can be either of the following values:

'sorted' (default) returns the unique values sorted in
ascending order.
'stable' returns the unique values according to their order
of occurrence.

B = unique ( A , occurrence ) returns the unique
values of the categorical array A according to their order of
occurrence. occurrence can be either of the following values:

'first' (default) returns the first occurrence of each
unique value, i.e. the lowest possible indices are returned.
'last' returns the last occurrence of each unique value,
i.e. the highest possible indices are returned.

You can specify setOrder and occurrence arguments together.

B = unique ( A , &hellip;, 'rows' ) returns the
unique rows of A by treating each row as a single entity. The
'rows' option can be used alone or in any combination with the
setOrder and occurrence arguments. 'rows' can be
placed at any position in the function&rsquo;s argument list after the input
array A . However, this syntax is only valid for 2-dimensional
categorical arrays.

[ B , ixA , ixB ] = unique (&hellip;) also returns
index vectors ixA and ixB using any of the previous syntaxes.
ixA and ixB map the arrays A and B to one another
such that B = A ( ixA ) and
A = B ( ixB ) . When the 'rows' optional
argument is specified, then B = A ( ixA ,:) and
A = B ( ixB ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Unique values in a categorical array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
categorical.vertcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1019
categorical: C = vertcat ( A , B , &hellip;)

Vertical concatenation of categorical arrays.

C = vertcat ( A , B , &hellip; is the equivalent of
the syntax B = [ A ; B ; &hellip;] and vertically
concatenates the categorical arrays A , B , &hellip;. All input
arrays must have the same size except along the first dimension. Any of
the input arrays may also be string arrays or cell arrays of character
vectors of compatible size.

If any input array is an ordinal categorical array, then all inputs must
be ordinal categorical arrays with the same set and ordering of
categories. In this case, C is also an ordinal categorical array
with the same set and ordering of categories. If none of the input
arrays are ordinal, then they do not need to have the same set of
categories. In this case, categorical array C contains the union
of the categories from all input arrays. Protected categorical arrays
can only be concatenated with other arrays that have the same set of
categories but not necessarily in the same order.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Vertical concatenation of categorical arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
cell2table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1240
datatypes: tbl = cell2table ( C )
datatypes: tbl = cell2table ( C , Name , Value )

Convert a cell array to a table.

tbl = cell2table ( C ) converts the 2-D cell array C
to the table tbl , where the contents of each column of C becomes
a variable in tbl . The contents of each column are concatenated into
their common data type (i.e. if a column of C contains explicitly
double numbers, then the corresponding variable in tbl is of
the same type), otherwise they are added as a column of cells.

tbl = cell2table ( C , Name , Value ) specifies
optional parameters for creating the table tbl with the following
Name-Value paired arguments.

Name Value
'VariableNames' A cell array of character vectors or
a string array defining the variable names of tbl . The names must be
valid variable names and unique.
'RowNames' A cell array of character vectors or
a string array defining the row names of tbl . The names must be unique
but not necessarily valid variable names.
'DimensionNames' A cell array of character vectors or
a string array defining the dimension names of tbl . The names must be
unique and not in conflict with variable names. By default, dimension names
are 'Row', 'Variables' .

See also:
array2table,
struct2table,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Convert a cell array to a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
convertCharsToStrings


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 724
datatypes: B = convertCharsToStrings ( A )
datatypes: [ B1 , &hellip;, Bn ] = convertCharsToStrings ( A1 , &hellip;, An )

Convert character arrays to a string arrays, where applicable.

B = convertCharsToStrings ( A ) converts A to a string
scalar, if A is a character vector or array, or to a string array, if
A is a cell array of character vectors. Otherwise, A is returned
unaltered.

[ B1 , &hellip;, Bn ] = convertCharsToStrings ( A1 ,
&hellip;, An ) converts any of the input arguments that are either
character arrays or cell arrays of character vectors to string scalars or
string arrays, respectively. Otherwise, convertCharsToStrings returns
the input arguments unaltered.

See also:
convertStringsToChars,
string


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Convert character arrays to a string arrays, where applicable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
convertStringsToChars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 634
datatypes: B = convertStringsToChars ( A )
datatypes: [ B1 , &hellip;, Bn ] = convertStringsToChars ( A1 , &hellip;, An )

Convert string arrays to a character arrays, where applicable.

B = convertStringsToChars ( A ) converts A to a
character vector, if A is a string scalar, or to a cell array of
character vectors, if A is a string array. Otherwise, A is
returned unaltered.

[ B1 , &hellip;, Bn ] = convertStringsToChars ( A1 ,
&hellip;, An ) converts any of the input arguments that are of string
type to character vectors or to cell array of character vectors, or leaves
them unaltered.

See also:
convertCharsToStrings,
string


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Convert string arrays to a character arrays, where applicable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
csv2table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8331
datatypes: tbl = csv2table ( filename )
datatypes: tbl = csv2table ( filename , Name , Value )

Load a CSV file into a table.

tbl = csv2table ( filename ) creates a table tbl by
reading the data in CSV file specified by filename , which can be either
character vector or a string scalar. If the CSV file was saved by the
table2csv method, then it reads the custom comment line in the first
element of the CSV file and reconstructs the table as specified including
variable types, variable names, and possibly any nested tables or structures
it may contain. If no such special comment is found, then it treats the CSV
file as simple columnar data and loads with the following default options.

The first column is considered as RowNames and it is converted
to cell array of character vectors and it is subsequently removed from the
remaining data contained in the CSV file. To change the default behavior,
you need to specify the ReadRowNames and RowNamesColumn
paired arguments accordingly.
The first line is treated as a header containing the variable names of
the table. Any numeric values in the header line are converted to character
vectors and all variable names are automatically modified to valid Octave
variable names. To change the default behavior, you need to specify the
ReadVariableNames , VariableNamingRule , and
VariableNamesRow paired arguments accordingly.
The data type of each column in the remaining data is automatically
detected according to its contents. Consequently, text is converted to
character vectors, datetime and duration strings are converted to datetime
and duration arrays, respectively, and hexadecimal strings are converted to
the smallest integer type that can represent all variable values. To change
the default behavior, you need to specify the TextType ,
DatetimeType , DurationType , and HexType accordingly.

tbl = csv2table ( filename , Name , Value )
specifies optional parameters for creating the table tbl with the
following Name-Value paired arguments.

Name Value
'NumHeaderLines' A positive integer scalar value
specifying the number of rows to omit reading from the CSV file. If the CSV
contains the custom comment line in its first element, then the
'NumHeaderLines' applies to the top number of rows to remove from the
created table. If CSV is a generic case, then 'NumHeaderLines'
specifies the number of lines to omit parsing from the CSV file itself.
'VariableNames' A cell array of character vectors or
a string array specifying the names of the variables of the created table.
The names must be unique but not necessarily valid variable names. If not
empty, it overrides any variable names extracted from the CSV file. This
applies both to custom and generic CSV files.
'ReadVariableNames' A logical scalar specifying
whether to parse or not the CSV files for variable names. If your CSV file
only contains data, set 'ReadVariableNames' to false so that
csv2table parses all lines as data rows in the returned table.
Variable names will be automatically generated to the default style as done
by table , unless otherwise specified by the 'VariableNames'
paired argument. The default value is true .
'VariableNamingRule' A character vector or a string
scalar specifying whether the variable names should be modified to valid
Octave variable names or the original names should be preserved. Valid
options are "modify" and "preserve" . By default,
csv2table modifies the parsed variable names.
'VariableNamesRow' A nonnegative integer scalar
value specifying the line number in the CSV file, which should be parsed for
variable names. This only applies if the 'ReadVariableNames' option
is true . The specified line is subsequently removed from the
remaining data contained in the CSV file. If 'VariableNamesRow' is
set to zero, then it is equivalent to setting 'ReadVariableNames' to
false .
'VariableNamesLine' MATLAB&rsquo;s spelling of
'VariableNamesRow' for a text file, and an exact alias of it.
Passing both names raises an error rather than one silently winning.
'VariableTypes' A cell array of character vectors or
a string array specifying the data type of the variables of the created
table. The number of elements must much the number of variable in the table.
This optional argument only has an effect on generic CSV files. When
specified, it overrides any other data type specification or automatic
detection by the csv2table function.
'VariableUnitsLine' A nonnegative integer scalar
value specifying the line number in the CSV file, which should be parsed for
variable units. The specified line is subsequently removed from the
remaining data contained in the CSV file.
'VariableDescriptionsLine' A nonnegative integer
scalar value specifying the line number in the CSV file, which should be
parsed for variable descriptions. The specified line is subsequently removed
from the remaining data contained in the CSV file.
'ReadRowNames' A logical scalar specifying whether to
parse or not the CSV files for row names. If your CSV file only contains
data, set 'ReadRowNames' to false so that csv2table
parses all columns as data columms in the returned table. The default value
is true .
'RowNamesColumn' A nonnegative integer scalar value
specifying the column number in the CSV file, which should be parsed for
row names. This only applies if the 'ReadRowNames' option is
true . The specified column is subsequently removed from the
remaining data contained in the CSV file. If 'RowNamesColumn' is set
to zero, then it is equivalent to setting 'ReadRowNames' to
false . Note that the values in the column specified by
'RowNamesColumn' must be unique, otherwise csv2table will
return an error. The default value is 0 : a file that does not say
which column holds its row names is read as data throughout, and a file
written by table2csv records the column itself. A leading column
headed Row , which is what writetable writes for the row
names, is taken as the row names without being named here.
'TextType' A character vector or a string scalar
specifying whether the text data in the CSV file should be stored in the
table as character vectors or string arrays. Valid options are
"char" and "string" . By default, csv2table stores
text data as character vectors.
'DatetimeType' A character vector or a string scalar
specifying whether the datetime strings found in the CSV file should be
stored in the table as datetime arrays or as text data. Valid options are
"datetime" and "text" . By default, csv2table stores
datetime strings as datetime arrays. If "text" is specified, then
the data type depends on the 'TextType' option.
'DurationType' A character vector or a string scalar
specifying whether the duration strings found in the CSV file should be
stored in the table as duration arrays or as text data. Valid options are
"duration" and "text" . By default, csv2table stores
duration strings as duration arrays. If "text" is specified, then
the data type depends on the 'TextType' option.
'HexType' A character vector or a string scalar specifying
whether the hexadecimal text found in the CSV file should be stored as a
suitable integer type, "auto" , as unaltered input text,
"text" (the default, in which case the data type depends on the
'TextType' option), or as any of the integer types supported by
Octave. Valid options are "auto" , "text" , "int8" ,
"int16" , "int32" , "int64" , "uint8" ,
"uint16" , "uint32" , and "uint64" . Detection is off
by default because MATLAB does not perform it, so a file carrying no header
of ours is read the way MATLAB reads it. It never applies to a file written
by table2csv , which declares every variable&rsquo;s type.

A datetime or duration variable written by table2csv is
restored exactly, along with its Format and, for a zone-aware
datetime , its TimeZone . Where the column&rsquo;s type is declared,
either by the file or by "VariableTypes" , a field that is empty and
unquoted carries no value and is read as a missing entry, where an empty
quoted field ( "" ) is read as an empty string; a column whose type is
guessed is unaffected. The following round-trip limitation applies when
reading a file written by table2csv : calendarDuration and
categorical variables are returned as cell arrays of character vectors
and their values are not reconstructed.

See also:
array2table,
struct2table,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Load a CSV file into a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
csv2timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1591
datatypes: tt = csv2timetable ( filename )
datatypes: tt = csv2timetable ( filename , Name , Value )

Read a comma-separated-value (CSV) file into a timetable.

tt = csv2timetable ( filename ) reads the CSV file named by
filename into a timetable . filename may be a character
vector, a cellstr, or a string scalar.

A file written by timetable2csv carries the package&rsquo;s own header
block, which names and types every variable and tags the leading column of
row times with their type, their TimeZone where they have one, and
their Format . Such a file comes back as the timetable it was
written from: the row times keep their type, zone and format exactly, and
the row dimension keeps its name.

Any other CSV file is read as csv2table reads it, and its
first datetime or duration variable becomes the row
times, the row dimension taking that variable&rsquo;s name. A file with no such
variable cannot be read as a timetable.

Every Name - Value option of csv2table is accepted and
behaves as it does there, with two exceptions. 'ReadRowNames' and
'RowNamesColumn' are refused: a timetable labels its rows by time
and by nothing else, so a file whose rows are named is read with
csv2table .

TimeStep and SampleRate are not stored in the file and are
worked out again from the row times, so a regular timetable comes back
regular. A CSV file carries no event table, so 'Events' of the
result is always empty even when the timetable that was written had one;
use timetable2ods and ods2timetable to keep events.

See also:
timetable2csv,
csv2table,
ods2timetable,
readtimetable,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
Read a comma-separated-value (CSV) file into a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
datetime


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1238
datatypes: datetime

Array representing points in time using the Gregorian calendar.

A datetime array stores internally the datetime points as double
arrays representing whole years, months, days, hours, and minutes, as well
as seconds including their fractional part. The underlying implementation
relies on the 'date.h' C++ library. The precision of this
implementation is set at microseconds, which is substantial for typical
times.

A datetime array is a collection of date/time elements, with each
element holding a complete date/time. The datetime array also has
TimeZone and Format properties associated with it, which
apply to all elements in the array.

When a display Format contains a time-zone name field
( z / zz / zzz ), the name is rendered according to a
session-wide style set by datetime.zoneNameStyle . The default,
'iana' , is an Octave-specific extension that shows the IANA
abbreviation for every zone (e.g. EEST ); 'matlab' restores
MATLAB&rsquo;s behaviour of naming only North American zones and showing a
numeric UTC+3 -style offset elsewhere. A single Format may
override the session style with zzzz (force 'iana' ) or
zzzzz (force 'matlab' ). See datetime.zoneNameStyle .

See also:
calendarDuration,
duration


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
Array representing points in time using the Gregorian calendar.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
datetime.Format


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1318
datetime: property Format

Display format

Display format, specified as a character vector or string scalar. If
specified as a string scalar, it is converted and stored internally as
a character vector.

The value 'default' is a data-dependent sentinel: a date-only
format ( 'dd-MMM-uuuu' ) is used when every element sits at
midnight, and a date and time format ( 'dd-MMM-uuuu HH:mm:ss' )
otherwise. The value 'defaultdate' always selects the
date-only format. Reading the property returns the resolved pattern,
never the sentinel itself.

A custom pattern is built from the following Unicode (LDML) fields;
repeating a letter widens or names the field. Any other text is
copied verbatim, and text in single quotes is always literal.

y , u Year; yy uses the last two digits.
M Month: number ( M , MM ), abbreviated
( MMM ), full ( MMMM ), or initial ( MMMMM ).
d Day of the month.
D Day of the year.
e Day of the week: number (Sunday is 1), abbreviated
( eee ), full ( eeee ), or initial ( eeeee ).
H , h Hour, 24-hour and 12-hour clock.
m Minute.
s Whole second (fractional seconds are truncated).
S Fractional second, one digit per S .
a AM or PM.
Q Quarter of the year.
G Era.
W Week of the month.
z Time-zone name (style set by
datetime.zoneNameStyle ; zzzz / zzzzz force it).
Z , X , x Numeric time-zone offset.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
Display format



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
datetime.SystemTimeZone


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 152
datetime: property SystemTimeZone

System time zone setting

A read-only property specifying the local time zone of the system, where
Octave is running.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
System time zone setting



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.TimeZone


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 987
datetime: property TimeZone

Time zone

Time zone, specified as a character vector or string scalar. If
specified as a string scalar, it is converted and stored internally as
a character vector.

Besides the zones of the IANA Time Zone Database, the value
'UTCLeapSeconds' selects UTC with its inserted leap seconds made
representable, so that the 60th second of a minute exists on the 27 dates
that have one. It is not an IANA zone and timezones does not list
it. An array in that zone counts elapsed SI seconds, which is what makes
its arithmetic differ from a UTC array&rsquo;s across an inserted second, and
for that reason it cannot be combined or compared with an array that does
not have leap seconds. Its Format is fixed to
"uuuu-MM-dd'T'HH:mm:ss'Z'" , optionally with one to nine
fractional-second digits, since no other pattern can write a 60th second;
moving such an array to any other zone folds an inserted second back onto
the 59th and restores the ordinary default format.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
Time zone



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.between


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 723
datetime: D = between ( A , B )
datetime: D = between ( A , B , components )

Calendar difference between two datetime arrays.

D = between ( A , B ) returns a
calendarDuration array holding the calendar difference from each
element of A to the corresponding element of B . The result
is signed (it is negative where B precedes A ) and is
expressed in whole calendar units plus a leftover time, taking month
lengths and daylight saving time into account. A and B must
be the same size or one of them must be scalar. Not-A-Time elements
yield NaN .

D = between ( A , B , components ) expresses
each difference using only the requested calendar components (see
caldiff ). The default is {'Years', 'Months', 'Days',
'Time'} .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Calendar difference between two datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.caldiff


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 924
datetime: D = caldiff ( A )
datetime: D = caldiff ( A , components )
datetime: D = caldiff ( A , components , dim )

Calendar differences between successive datetime elements.

D = caldiff ( A ) returns a calendarDuration
array holding the calendar difference between successive elements of
A along its first non-singleton dimension. Unlike diff , the
result is expressed in whole calendar units (years, months, days) plus a
leftover time, so it is aware of month lengths and, for a zoned array, of
daylight saving time. Not-A-Time elements yield NaN .

D = caldiff ( A , components ) expresses each
difference using only the requested calendar components. components
is one of 'Years' , 'Quarters' , 'Months' ,
'Weeks' , 'Days' , or 'Time' , or a cell array or
string array containing several of them. The default is
{'Years', 'Months', 'Days', 'Time'} .

D = caldiff ( A , components , dim ) operates
along dimension dim .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Calendar differences between successive datetime elements.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
datetime.cat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1506
datetime: C = cat ( dim , A , B , &hellip;)

Concatenate datetime arrays.

C = cat ( dim , A , B , &hellip;) concatenates
the inputs A , B , &hellip; along dimension dim . They
must have the same size except along the operating dimension dim .

At least one input must be a datetime array. Date/time text, whether a
character vector, a cellstr, or a string array, is converted; a
0&times;0 empty [] or {} contributes nothing and is
dropped, so an array may be accumulated from an empty start. Any other
input, an empty numeric array of non-zero size included, is an error.

The first datetime input gives the result its Format and
TimeZone , and is what date/time text is read against: such text
names a wall clock in that time zone rather than an instant to be
converted into it. Text may therefore appear first, as in
[ '2024-01-01' , T ] , and still be read in T &rsquo;s
zone.

Zoned inputs need not share a time zone; each is converted into the zone
of the first, which preserves the instant every element names and changes
only its wall-clock reading. A zoned input cannot be concatenated with
an unzoned one, in either order: a wall clock that names no instant and
one that does do not belong in the same array. A bare NaT and
datetime.empty are unzoned and so take part in that rule, whereas
NaT ( 'TimeZone' , tz ) does not.

Date/time text that is empty names no date and becomes NaT , so an
empty character vector adds one missing element, whereas an empty
{} holds no text at all and adds none.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Concatenate datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.cellstr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 257
datetime: cstr = cellstr ( T )
datetime: cstr = cellstr ( T , Format )

Convert datetime array to a cell array of character vectors.

cstr = cellstr ( T ) returns a cellstr array of
character vectors, cstr , which has the same size as the input
datetime T .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
Convert datetime array to a cell array of character vectors.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.char


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 189
datetime: cmat = char ( T )
datetime: cmat = char ( T , Format )

Convert datetime array to a character matrix.

cmat = char ( T ) returns a character matrix with one
row per element in T .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Convert datetime array to a character matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.circshift


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 743
datetime: B = circshift ( A , n )
datetime: B = circshift ( A , n , dim )

Circularly shift the elements in a datetime array.

B = circshift ( A , n ) circularly shifts the
elements of the datetime array A according to n . If n
is a nonzero integer scalar, then the elements of A are shifted by
n elements along the first non-singleton dimension of A . If
n is a vector, it must not be longer that the number of dimensions
of A with each value of n corresponding to a dimension in
A . The sign of the value(s) in n specify the direction in
the elements of A are shifted.

B = circshift ( A , n , dim ) circularly
shifts the elements of the datetime array A along the dimension
specified by dim . In this case, n must be a scalar integer
value.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Circularly shift the elements in a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
datetime.colon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1294
datetime: R = colon ( A , B )
datetime: R = colon ( A , step , B )

Create a range of datetime values.

R = colon ( A , B ) is the equivalent of the syntax
R = A : B and returns a row vector of datetime
values starting at A and increasing in steps of one calendar day up
to, and possibly including, B .

R = colon ( A , step , B ) is the equivalent
of the syntax R = A : step : B and uses the
specified step between consecutive elements. step may be:

a duration or a numeric scalar (a number of fixed 24-hour
days), in which case successive elements advance by a fixed amount of
elapsed time; for a zoned range this is aware of daylight saving time.
a calendarDuration , in which case successive elements
advance in calendar units. Each element is computed as A +
k* step for k = 0, 1, 2, &hellip; , so month and year steps
clamp the day of month independently for every element (e.g. a
one-month step from 31 January yields 31 January, 28 February, 31 March,
&hellip;).

The default step of A : B is one calendar day
( caldays (1) ), which preserves the time of day across daylight
saving time changes. A range whose step points away from B
(for example an increasing step with A > B ) is empty.
A and B must be datetime scalars that are either both zoned
or both unzoned, and must be finite.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Create a range of datetime values.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.convertTo


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3380
datetime: X = convertTo ( T , dateType )
datetime: X = convertTo ( T , 'epochtime' , Name , Value )

Convert datetime array to a numeric representation.

X = convertTo ( T , dateType ) converts the
datetime array T to the numeric date/time representation named by
dateType , returning an array X of the same size as T .
It is a convenience wrapper around the individual conversion methods.
dateType may be one of:

'datenum' &ndash; serial date number, double (see
datenum ).
'excel' or 'excel1900' &ndash; Excel serial date, 1900
system, double (see exceltime ).
'excel1904' &ndash; Excel serial date, 1904 system,
double .
'juliandate' &ndash; Julian date, double (see
juliandate ).
'modifiedjuliandate' &ndash; modified Julian date,
double .
'posixtime' &ndash; seconds since the Unix epoch, double
(see posixtime ).
'yyyymmdd' &ndash; YYYYMMDD numeric date, double
(see yyyymmdd ).
'epochtime' &ndash; ticks since an epoch, int64 (see
below).
'ntp' &ndash; NTP timestamp, uint64 , valid from
1900-01-01 up to 2036-02-07.
'ntfs' &ndash; NTFS/FILETIME 100-ns ticks since 1601-01-01,
uint64 .
'.net' &ndash; .NET 100-ns ticks since 0001-01-01,
uint64 .
'tt2000' &ndash; CDF TT2000 nanoseconds since the J2000
Terrestrial Time epoch, int64 (see below).

For the double conversions, Not-A-Time ( NaT ) values are
returned as NaN . The integer conversions cannot represent
NaN , so a NaT value, an infinite datetime, or a datetime
outside the target format&rsquo;s representable range raises an error.

X = convertTo ( T , 'epochtime' , Name ,
Value ) accepts the options 'Epoch' (a scalar datetime
marking tick zero; default 1970-01-01 ) and
'TicksPerSecond' (a positive scalar; default 1 ). The
epoch and T must both be zoned or both be unzoned.

X = convertTo ( T , 'tt2000' ) returns the number
of nanoseconds since the J2000 Terrestrial Time epoch,
2000-01-01T11:58:55.816Z , as an int64 array. Because that
count includes leap seconds, T must be in the
'UTCLeapSeconds' time zone. The inverse is
datetime ( X , 'ConvertFrom' , 'tt2000' ,
'TimeZone' , 'UTCLeapSeconds' ) , which likewise requires
both the int64 type and that zone.

Each conversion treats an inserted leap second the way its own format
does. posixtime folds it forward onto the following second, while
datenum , exceltime , 'epochtime' , 'ntp' ,
'ntfs' and '.net' fold it backward onto the preceding
one; juliandate stretches the day that holds it (see
juliandate ), and 'tt2000' counts it.

Deviations from MATLAB. Two results differ deliberately for a
'UTCLeapSeconds' array, because MATLAB&rsquo;s own are inconsistent.

'epochtime' with an 'Epoch' : MATLAB folds the array
onto the POSIX timeline but measures the epoch on the leap-second one, so
its tick count is short by the number of seconds inserted before that
epoch. Counting from 2016-12-31 it returns 86373 for
2016-12-31T23:59:59Z , 26 short. Both operands are folded the same
way here, giving 86399 . Only the offset differs: a difference
between two such counts is the same in either.
'tt2000' between 1960 and 1972: before 1972 UTC did not
tick with atomic time, and its offset from it is tabulated by the IERS
as a base value plus a rate per day. That table is followed here; MATLAB
evaluates the rate half a day from where the table places it, leaving its
results up to 1.3 milliseconds off. Outside those twelve years
the two agree exactly.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Convert datetime array to a numeric representation.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
datetime.ctranspose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 235
datetime: B = ctranspose ( A )

Transpose a datetime matrix.

B = ctranspose ( A ) is the equivalent of the syntax
B = A ' and returns the transpose of the datetime
matrix A . For datetime arrays, ctranspose is identical to
transpose .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Transpose a datetime matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.datenum


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 681
datetime: N = datenum ( T )

Convert datetime array to serial date numbers.

N = datenum ( T ) returns a double array N
of the same size as T holding the serial date number of each
element, where 1 corresponds to January 1 of the year 0000 and the
fractional part represents the time of day. The time zone of a zoned
T is ignored; its wall-clock components are used. Not-A-Time
( NaT ) values are returned as NaN , and infinite datetimes
preserve their sign.

A serial date number has no room for an inserted leap second, so for a
'UTCLeapSeconds' array the 60th second of a minute folds backward
onto the 59th: datenum of 2016-12-31T23:59:60Z equals that
of 2016-12-31T23:59:59Z .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Convert datetime array to serial date numbers.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.dateshift


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1384
datetime: R = dateshift ( A , 'start' , unit )
datetime: R = dateshift ( A , 'end' , unit )
datetime: R = dateshift (&hellip;, rule )
datetime: R = dateshift ( A , 'dayofweek' , dow )
datetime: R = dateshift ( A , 'dayofweek' , dow , rule )

Shift datetime values to calendar boundaries.

R = dateshift ( A , 'start' , unit ) returns
a datetime array in which each element of A is moved back to the
start of the calendar unit that contains it, with the finer
components set to zero. unit is 'second' ,
'minute' , 'hour' , 'day' , 'week' ,
'month' , 'quarter' , or 'year' . A week starts on
Sunday.

R = dateshift ( A , 'end' , unit ) moves
each element to the end of its unit: the start of the next second,
minute, hour, or day, and the last day (at midnight) of the week, month,
quarter, or year.

R = dateshift (&hellip;, rule ) first shifts each
element by rule whole units. rule is 'current' (the
default), 'next' , 'previous' , 'nearest' , or an
integer number of units.

R = dateshift ( A , 'dayofweek' , dow )
moves each element to the next date, on or after it, whose day of the
week is dow (a number from 1 for Sunday to 7 for Saturday, or a day
name), keeping the time of day. A trailing rule of
'previous' , 'nearest' , 'current' (the day within
the current week), or an integer occurrence selects a different date.

Not-A-Time and infinite elements are returned unchanged.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Shift datetime values to calendar boundaries.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.datestr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1035
datetime: S = datestr ( T )
datetime: S = datestr ( T , f )
datetime: S = datestr (&hellip;, opt )

Convert datetime array to a character array of date strings.

S = datestr ( T ) converts the datetime array T to
a character array S with one date string per row, using the default
format of the core datestr function.

S = datestr ( T , f ) uses the format specified by
f , a format number or a format string that follows the
legacy datestr field codes, in which 'mm' denotes
months and 'MM' denotes minutes. Any further arguments opt
are passed on to the core datestr function.

datestr is provided for compatibility with legacy code. It
renders the wall-clock components of T and, for a zoned array, does
not include the time zone. For time-zone-aware formatting with the
modern Unicode (LDML) field codes, use char , cellstr , or
set the Format property of T instead.

The legacy field codes have no way to write a 60th second, so for a
'UTCLeapSeconds' array an inserted second folds backward onto the
59th, as it does in datenum .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
Convert datetime array to a character array of date strings.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.datetime


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16155
datetime: T = datetime ( 'now' )
datetime: T = datetime ( 'today' )
datetime: T = datetime ( 'tomorrow' )
datetime: T = datetime ( 'yesterday' )
datetime: T = datetime ( DateStrings )
datetime: T = datetime ( DateStrings , 'MixedFormats' , TF )
datetime: T = datetime ( DateStrings , 'InputFormat' , INFMT )
datetime: T = datetime ( DateStrings , 'InputFormat' , INFMT , 'PivotYear' , PIVOT )
datetime: T = datetime ( DateStrings , 'InputFormat' , INFMT , 'Locale' , LOCALE )
datetime: T = datetime ( DateVectors )
datetime: T = datetime ( Y , MO , D )
datetime: T = datetime ( Y , MO , D , H , MI , S )
datetime: T = datetime ( Y , MO , D , H , MI , S , MS )
datetime: T = datetime ( X , 'ConvertFrom' , TYPE )
datetime: T = datetime ( D )
datetime: T = datetime (&hellip;, 'Format' , FMT )
datetime: T = datetime (&hellip;, 'TimeZone' , TZ )

Create a new array of datetime values.

T = datetime ( 'now' ) returns a scalar datetime array
corresponding to the current date and time. T = datetime
( 'now' ) is the same as T = datetime () . Except for
'now' , the same syntax can be used with 'today' ,
'tomorrow' and 'yesterday' . These options return the
respective date but with time set at midnight.

T = datetime ( DateStrings ) creates a datetime array
from the text in DateStrings representing points in time. Without
an 'InputFormat' , one format is detected from the first piece of
text that is not blank, and every other piece is then read with that same
format: text written in a different one is not given a format of its own
but becomes NaT , so that a column of dates is read as the single
thing it is meant to be. Text no format can be detected from at all is
refused outright. A date that the detected format cannot make sense of,
such as '2024-04-31' , is refused in the same way an explicit
'InputFormat' refuses it.

The formats detected are:

'uuuu-MM-dd' optionally followed by 'HH:mm' ,
'HH:mm:ss' , or either with fractional seconds, the date and the
time separated by a space or by 'T' .
'dd-MMM-uuuu' month named in full or abbreviated,
optionally followed by a time as above.
'MMMM d, uuuu' as in 'March 15, 2024' .
'MM/dd/uuuu' or 'dd/MM/uuuu' ; see below.
'HH:mm:ss' a time alone, taking today&rsquo;s date.

Three further shapes are read that MATLAB does not detect, and are
Octave extensions: 'uuuu/MM/dd' with an optional time,
'dd MMMM uuuu' as in '15 March 2024' , and a year alone.
Numeric fields need not be padded, so '2024-2-9' reads as
'2024-02-09' does.

A date written with slashes is ambiguous: '03/09/2024' is the 3rd
of September to some readers and the 9th of March to others. The whole
array decides, since one entry naming a day past the twelfth settles the
order for all of them; where nothing settles it the American reading is
taken and a warning
( 'Octave:datetime:ambiguous-format' ) is raised.

T = datetime ( DateStrings , 'MixedFormats' ,
true ) detects a format for each piece of text separately instead,
so text gathered from several sources into one column is read whatever
each entry happens to be written in. This is an Octave extension, off by
default; MATLAB has no equivalent. It reads the wider set of formats
Octave&rsquo;s core datevec accepts, and rolls an impossible date over
rather than refusing it, so '2024-04-31' is read as the 1st of
May. It cannot tell a mistake from a format it has not seen before,
which is why it is not the default.

T = datetime ( DateStrings , 'InputFormat' ,
INFMT ) also allows to specify a particular input text format to
parse DateStrings . It is always preferable to specify the format
INFMT if it is known. INFMT uses the Unicode LDML date field
symbols ( 'y' , 'M' , 'd' , 'H' , 'h' ,
'm' , 's' , 'S' , 'a' , &hellip;), the same
set used for display formats; text between single quotes is treated as a
literal. Formats which do not specify a particular time component will
have the value set to zero. Formats which do not specify any date
component default to the current date, whereas a partially specified date
defaults its missing month and day to 1.

A string that does not match INFMT , or that names a date which does
not exist, such as '2024-04-31' or a 29th of February outside a
leap year, cannot be converted. A lone such string is an error; within
an array only that element is lost and becomes NaT , so that one
unreadable entry does not cost the rest of the array.

T = datetime ( DateStrings , 'InputFormat' ,
INFMT , 'PivotYear' , PIVOT ) also allows to specify a
pivot year, which refers to the year at the start of the century to which
two-digit years will be referenced. When not specified, it defaults to
the current year minus 50.

T = datetime ( DateStrings , 'InputFormat' ,
INFMT , 'Locale' , LOCALE ) interprets the month names,
weekday names, and day-period markers in DateStrings according to
LOCALE , given as an 'xx_YY' identifier whose language part
selects the names. The supported languages are 'en' (the
default), 'fr' , 'de' , 'es' , 'it' ,
'pt' , and 'el' ; 'system' is treated as
'en' . Both full ( 'MMMM' / 'eeee' ) and abbreviated
( 'MMM' / 'eee' ) month and weekday names are recognized
case-insensitively; for Greek, matching is also accent-insensitive, so
the accentless all-caps spelling is accepted, and the genitive month
forms ( 'Μαρτίου' ) are used. A weekday name is validated but does
not otherwise affect the result.

T = datetime ( DateVectors ) creates a column vector of
datetime values from the date vectors in DateVectors .

T = datetime ( Y , MO , D creates an array of
datetime values for corresponding elements of the Y , MO , and
D arrays, which must be of the same size or scalars, must contain
integer values, and they correspond to years, months, and days,
respectively.

T = datetime ( Y , MO , D , H , MI ,
S ) also adds time components to the constructed datetime arrays.
H , MI , and S must be of the same size or scalars.
H and MI must contain integer values, whereas S may
also contain a fractional part.

T = datetime ( Y , MO , D , H , MI ,
S , MS ) also adds a milliseconds component, MS , which
may also have a fractional part.

T = datetime ( X , 'ConvertFrom' , TYPE )
converts the numeric values in X to a datetime array according to
the data type specified by TYPE . The following types are
supported:

'datenum'
'excel'
'excel1904'
'posixtime'
'epochtime'
'juliandate'
'modifiedjuliandate'
'yyyymmdd'
'ntp' &ndash; requires uint64 input.
'ntfs' &ndash; requires uint64 input.
'.net' &ndash; requires uint64 input.
'tt2000' &ndash; requires int64 input and the
'UTCLeapSeconds' time zone (see convertTo ).

'Epoch' (a scalar datetime marking tick zero, default
1970-01-01 ) and 'TicksPerSecond' (a positive scalar,
default 1 ) bear on 'epochtime' alone; they are accepted
alongside any other conversion and ignored, each of the others counting
from an epoch of its own.

Whether the count measures elapsed or wall-clock time
follows from the epoch. When the epoch and 'TimeZone' are
both zoned the count is elapsed time from a known instant, so
datetime ( X , 'ConvertFrom', 'epochtime', 'Epoch',
datetime (1970, 1, 1, 'TimeZone', 'UTC'), 'TimeZone', Z ) agrees
with 'posixtime' . Otherwise the epoch is a wall clock, its zone
dropped if it had one, and so is the count &ndash; which is why the
default does not agree with 'posixtime' : its epoch is
unzoned, so 1730611800 names 05:30 on the local clock of whatever
zone is asked for rather than the instant 05:30 UTC. That is not an
inconsistency but the meaning of an epoch-relative count, and MATLAB
reads it the same way.

Each is the inverse of the convertTo conversion of the same name
and treats an inserted leap second the way that conversion does, so the
two round-trip. Where the conversion folded the inserted second away &ndash;
'datenum' , 'excel' , 'excel1904' ,
'epochtime' , 'ntp' , 'ntfs' and '.net'
all do &ndash; it cannot be recovered and the preceding second is returned,
just as those conversions give the two instants of a repeated wall clock
the same value. The Julian scales measure the fraction of a day against
that day&rsquo;s own length and so keep an inserted second, returning
23:59:60 where one was given. A Julian day number is a large one
and a double holds it to about 40 microseconds at present-day dates,
which bounds the accuracy of 'juliandate' in both directions;
'modifiedjuliandate' counts from a nearer epoch and is some
forty times finer.

Deviation from MATLAB. For a 'UTCLeapSeconds' array,
'epochtime' given an 'Epoch' counts both operands on the
same timeline here, while MATLAB folds the array onto the POSIX one and
measures the epoch on the leap-second one, so its answer runs long by the
seconds inserted before that epoch: counting 86399 from
2016-12-31 it returns 2017-01-01T00:00:25 , 26 seconds past
the 23:59:59 that both consistent readings give. This is the same
inconsistency already documented for convertTo in the other
direction, and inverting it the same way is what makes the pair
round-trip.

Deviation from MATLAB. For a 'UTCLeapSeconds' array,
MATLAB&rsquo;s 'juliandate' does not invert its own
convertTo ( T , 'juliandate') : it returns an instant half a
second later than the one it was given, on the day of an inserted second
and for every element of it. Its 'modifiedjuliandate' inverts
correctly over the same day, so the two disagree with each other as well.
The conversion here inverts exactly, in both scales. This is the same
half-day slip already documented for 'tt2000' between 1960 and
1972 in convertTo .

T = datetime ( D ) , where D is already a datetime
array, copies it: the components, the TimeZone and the
Format all carry over. A 'Format' or 'TimeZone'
may still be given to change either, and take effect exactly as assigning
those properties does, so attaching a zone to an unzoned array keeps its
wall-clock values whereas changing between two zones keeps the instant.
The options describing how text is read, 'InputFormat' ,
'Locale' and 'PivotYear' , have nothing to act on and are
ignored, while 'ConvertFrom' is an error.

T = datetime (&hellip;, 'Format' , FMT )
specifies the display format of the values in the output datetime array.
FMT uses the same Unicode LDML date field symbols as
'InputFormat' , with 'z' , 'Z' , 'X' , and
'x' additionally naming the time zone, and text between single
quotes taken literally. The default format renders a date alone when
every element sits at midnight and a date with a time otherwise; a
NaT carries no time of day and does not affect that choice.

T = datetime (&hellip;, 'TimeZone' , TZ ) sets
the time zone of the values in the output datetime array. If not
specified, the array is unzoned: its values are wall-clock readings that
name no absolute instant, and no daylight saving rule applies to them.
Supported time zones are those of the IANA Time Zone Database. A zone
may also be attached, changed, or dropped afterwards through the
'TimeZone' property; attaching one reinterprets the wall-clock
values in that zone, whereas changing between two zones preserves the
absolute instant and shifts the wall-clock values by the difference in
offset.

Twice a year a zone that observes Daylight Saving Time (DST) has
wall-clock readings that name no unique instant. Where the clock goes
back an hour repeats, and such a reading is taken at the later of the two
offsets, that is, standard time. Where the clock goes forward an
interval is skipped, and a reading inside it is one no clock in that zone
ever shows. Given as numeric components, such a reading is moved ahead
by the length of the skipped interval, so that with the usual one-hour
skip '02:30' becomes '03:30' ; given as text it is instead
rejected, since text is a claim about a reading that never occurred. A
lone such string is an error, whereas within an array only that element
is lost and becomes NaT ; without an 'InputFormat' the
whole input is rejected, as when no format can be detected at all.

In the 'UTCLeapSeconds' zone the seconds component may reach 60,
naming an inserted leap second, but only on one of the 27 dates that has
one and only in the last minute of the day; anywhere else it rolls over
as usual. The seconds component is counted along the leap-second
timeline, so '23:59:61' on such a date is the next midnight
rather than one second past it, whereas an hour or minute that overflows
over the inserted second entirely. Text naming a leap second that was
never inserted is rejected, exactly as text naming a wall clock a zone
skips is. Without an 'InputFormat' such an array reads only the
ISO 8601 UTC shape it also writes.

The representable range of years. The calendar is proleptic
Gregorian and its arithmetic is 64-bit, so an unzoned array holds any
year its components can, and so do the 'UTC' and
'UTCLeapSeconds' zones, whose offset is zero at every instant.
Every other zone answers for any year as well, though beyond the
IANA database&rsquo;s own range there is no zone data to consult &ndash;
only the rule it carries for all future time. That rule is written as an
nth weekday of a month, so it repeats exactly every 400 years, the period
over which weekday and leap year both return to where they started; the
offset for a distant year is therefore taken from the congruent year
inside the database&rsquo;s range. MATLAB extrapolates in the same way and
agrees period for period, up to its own limit of about year 144684,
beyond which it raises where this class continues to answer. A date
before any zone had a transition takes that zone&rsquo;s local mean time,
again as MATLAB does within its range.

Deviation from MATLAB in the components of an infinite
datetime. Building one is documented behaviour and is followed exactly:
a component of Inf or -Inf makes the datetime infinite, and
one of NaN makes it NaT . What the components of such a
value read back as is documented nowhere, and the two implementations
differ. Here every component is that infinity, whichever one carried it
and whatever its sign, so ymd and datevec answer with one
value rather than two, the sign is visible in each, and the components
rebuild the value they came from. MATLAB reports the year alone as
infinite and NaN for the other five, a tuple its own constructor
then reads as NaT &ndash; so its components do not reconstruct the
datetime they describe. Everything else agrees: isnat ,
isinf , the display, the ordering, and that NaN beats an
infinity while two infinities of opposite sign name no moment at all.

Deviation from MATLAB in how wide a year may be written in
text. MATLAB reads at most six significant digits there, whatever the
format asks for, so it cannot read back a year past 999999 &ndash; including
one its own writetable has just written. Here the year is read as
far as the calendar carries it, so that a file this class writes is one
it can read. The divergence is additive: every string MATLAB accepts is
read the same way, and only text it refuses outright is also accepted.

Deviation from MATLAB in how a very distant year is displayed.
MATLAB stops honouring the requested display format about year 144684 &ndash;
where the instant it stores internally stops being exact to the
millisecond &ndash; and prints '1000000 CE' or '1000000 BCE'
instead, text which cannot be read back even by giving an era field.
Here the components are separate double values and lose nothing there, so
the format asked for is always the format rendered.

Deviations from MATLAB when copying a datetime array and giving
a 'TimeZone' . MATLAB&rsquo;s constructor keeps the display format of
the array it copies, while its TimeZone property assignment
replaces it for the same change of zone; the two disagree, so here both
follow the one rule, that of the property. Leaving
'UTCLeapSeconds' therefore restores the ordinary default format
rather than keeping the ISO 8601 pattern, whose 'Z' would
misdescribe any zone but UTC. For the same reason, entering
'UTCLeapSeconds' works here, the locked format being applied,
where MATLAB carries the copied format across and then rejects it as one
that zone does not allow.

See also:
NaT,
datetime,
isdatetime,
calendarDuration,
duration


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 575
'InputFormat', INFMT, 'PivotYear', PIVOT) @deftypefnx {datetime} {T =} datetime (DateStrings,@ 'InputFormat', INFMT, 'Locale', LOCALE) @deftypefnx {datetime} {T =} datetime (DateVectors) @deftypefnx {datetime} {T =} datetime (Y, MO, D) @deftypefnx {datetime} {T =} datetime (Y, MO, D, H, MI, S) @deftypefnx {datetime} {T =} datetime (Y, MO, D, H, MI, S, MS) @deftypefnx {datetime} {T =} datetime (X, 'ConvertFrom', TYPE) @deftypefnx {datetime} {T =} datetime (D) @deftypefnx {datetime} {T =} datetime (, 'Format', FMT) @deftypefnx {datetime} {T =} datetime (, 'TimeZone', TZ)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.datevec


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 146
datetime: DV = datevec ( T )

Convert datetime array to date vectors.

DV = datevec ( T ) returns a numeric matrix with one row
per element in T .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Convert datetime array to date vectors.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
datetime.day


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1380
datetime: D = day ( T )
datetime: D = day ( T , dayType )

Day component of a datetime array.

D = day ( T ) returns the day number for each element of
the input datetime array T . The output D is a double
array containing integer values in the range [1, 31] , depending on
the month and year, and it has the same size as T . Not-A-Time
( NaT ) values in T are returned as NaN in the output
array.

D = day ( T , dayType ) returns the day number or
name for each element of the input datetime array T as specified by
dayType , which may have any of the following options:

'dayofmonth' (default) returns the day-of-month number in a
numeric array. Depending on the month and year, it can range from 1 to
28, 29, 30, or 31.
'dayofweek' returns the day-of-week number in a numeric
array of double integer values ranging from 1 to 7, where 1
corresponds to Sunday.
'iso-dayofweek' returns the day-of-week number in a numeric
array of double integer values ranging from 1 to 7, where 1
corresponds to Monday according to the ISO 8601 standard.
'dayofyear' returns the day-of-year number in a numeric
array of double integer values ranging from 1 to 365 or 366,
depending on the year.
'name' returns the corresponding full name of the day in
a cell array of character vectors.
'shortname' returns the corresponding 3-letter abbreviation
of the day in a cell array of character vectors.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Day component of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.diff


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 708
datetime: D = diff ( A )
datetime: D = diff ( A , N )
datetime: D = diff ( A , N , dim )

Differences between successive datetime elements.

D = diff ( A ) returns a duration array holding
the elapsed time between successive elements of A along its first
non-singleton dimension. The differences are computed from the absolute
instants, so for a zoned array they are aware of daylight saving time
transitions (a calendar day spanning a transition is 23 or 25 hours, not
24). Not-A-Time elements propagate as NaN durations.

D = diff ( A , N ) applies diff
recursively N times, returning the N -th order difference.
N must be a positive integer scalar.

D = diff ( A , N , dim ) operates along
dimension dim .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Differences between successive datetime elements.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
datetime.discretize


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4628
datetime: bin = discretize ( T , edges )
datetime: bin = discretize ( T , N )
datetime: bin = discretize ( T , dur )
datetime: bin = discretize ( T , unit )
datetime: Y = discretize (&hellip;, values )
datetime: C = discretize (&hellip;, &rsquo;categorical&rsquo;)
datetime: C = discretize (&hellip;, &rsquo;categorical&rsquo;, names )
datetime: [ bin , E ] = discretize (&hellip;)

Group datetimes into bins.

bin = discretize ( T , edges ) returns, for each
element of T , the index of the bin of the datetime vector
edges that contains it. Bins are half open,
[ E (j), E (j+1)) , except the last which is closed at
both ends. Elements outside the edges, and NaT elements, give
NaN .

bin = discretize ( T , N ) uses N bins
spanning the data, placed on whole calendar or clock units wherever that
can be done without leaving a bin unused.

bin = discretize ( T , dur ) uses bins one
dur wide, where dur is a scalar duration or
calendarDuration , aligned to whole multiples of that width.

bin = discretize ( T , unit ) uses bins one named
unit wide, unit being one of 'second' , 'minute' ,
'hour' , 'day' , 'week' , 'month' ,
'quarter' , 'year' , 'decade' or
'century' . These land on real calendar boundaries: a
'week' bin starts on a Sunday, a 'quarter' on 1 January,
1 April, 1 July or 1 October, and a 'decade' on a year that is a
multiple of ten.

Y = discretize (&hellip;, values ) returns
values ( bin ) instead of the bin index, and
C = discretize (&hellip;, 'categorical') returns a
categorical array whose categories are named after the bins.

[ bin , E ] = discretize (&hellip;) also returns the bin
edges as a datetime array carrying this array&rsquo;s Format
and TimeZone .

Note that whether a bin follows the calendar depends on how its width
is given, not on how long that width is. A named unit ( 'day'
and coarser) or a calendarDuration width begins at
local midnight , so in a time zone that observes daylight
saving the bin holding a transition is 23 or 25 hours long while its
neighbours are 24. A duration width is a fixed span of elapsed
time whatever its length: days (1) bins are each exactly 24
hours, and their edges therefore read an hour later on the far side of
a transition. The two agree for an unzoned array, and for a zoned one
that spans no transition.

A named unit opens one bin past the data when the largest element sits
on a unit boundary of the wall clock. Sub-day bins step in elapsed
time, so in a zone whose shift is not a whole number of those units &ndash;
Australia/Lord_Howe moves its clock half an hour, against an
'hour' bin &ndash; the grid leaves the wall clock past a transition
and an element may then land mid-unit. Such an element gets a bin of
its own here. This is deliberately unlike MATLAB , which closes
its last edge short of it and leaves it out of every bin.

Deviation from MATLAB: bin placement where a zone&rsquo;s clock shifts
by a fraction of the bin unit. A bin grid is anchored on the wall clock
and stepped in elapsed time, so a zone that moves its clock by less than
one bin unit &ndash; Australia/Lord_Howe moves it half an hour &ndash; puts
the grid out of step with the clock from the transition onward. Where
the shift is exactly half a unit the placement matches MATLAB,
having been measured against it. For any other fraction, which today
arises only from the historical offset changes of the early twentieth
century ( Asia/Singapore moved by twenty minutes in 1933), the
placement is our own : the grid is centred on the data with no
correction for the transition, exactly as in a zone that has none.
MATLAB places those bins differently, by a rule we have not been able to
derive from its output; both cover the data, and neither is more correct
than the other. Only a requested bin count is affected &ndash; and
'auto' , 'scott' , 'fd' , 'sturges' and
'sqrt' , which resolve to one. An explicit 'BinWidth' or
a named unit is placed identically to MATLAB in every zone.

A bin width below a second carries a little noise in its edges. An
instant is counted in seconds from 1970 and so runs to about 1.7e9, where
a double resolves to some 2e-7 of a second; a width of, say, 0.4 s
therefore lands its edges within a few hundred nanoseconds of the exact
grid rather than on it. The opening edge is exact, the drift is in the
step, and it is a limit of the representation rather than of the
placement.

When T is empty the edges are anchored on the epoch,
1970-01-01 . This is deliberately unlike MATLAB , which
answers an empty datetime with edges taken from the current
clock, so that the same call returns a different result every time it is
run.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Group datetimes into bins.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
datetime.dispstrings


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 233
datetime: cstr = dispstrings ( T )

Get display formatted strings for each element of a datetime object.

cstr = dispstrings ( T ) returns a cellstr array of
character vectors, cstr , which has the same size as the input
datetime T .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Get display formatted strings for each element of a datetime object.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
datetime.empty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 620
datetime: E = datetime.empty ()
datetime: E = datetime.empty ( sz )
datetime: E = datetime.empty ( m , n , &hellip;)

Create an empty datetime array.

E = datetime.empty () returns a 0&times;0 empty datetime
array. datetime.empty ( m , n , &hellip;) or
datetime.empty ( sz ) returns an empty datetime array of the
requested size, which must have at least one dimension equal to zero. A
lone dimension gives a square size, so datetime.empty (3) is an
error while datetime.empty (0) is 0&times;0 . As for
zeros , a negative dimension counts as zero, and a size vector with
nothing in it names no size and gives 0&times;0 .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Create an empty datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
datetime.eq


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 563
datetime: TF = eq ( A , B )

Equality comparison for datetime arrays.

TF = eq ( A , B ) is the equivalent of the syntax
TF = A == B and returns a logical array set to
true where the corresponding elements of A and B are
the same point in time, and false otherwise.

Both operands must be datetime arrays and either both have a time zone or
both be unzoned; zoned arrays are compared by their absolute instants, so
the two time zones may differ. A and B must be size
compatible. Not-A-Time is never equal to anything, including another
Not-A-Time, just like NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Equality comparison for datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.exceltime


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1189
datetime: E = exceltime ( T )
datetime: E = exceltime ( T , dateType )

Convert datetime array to Excel serial date numbers.

E = exceltime ( T ) returns a double array
E of the same size as T holding the Excel serial date number
of each element, using the Excel 1900 date system, in which the
fractional part represents the time of day. As in Excel, the year 1900
is treated as a leap year, so serial numbers on or after 1900-03-01
account for the nonexistent date 1900-02-29.

E = exceltime ( T , dateType ) selects the date
system: '1900' (default) or '1904' . The 1904 system
counts days from 1904-01-01 and has no leap-year anomaly, so a date
before 1900-03-01 is a plain day count and its serial is one greater than
MATLAB returns; MATLAB derives the 1904 serial from the 1900 one and
carries the nonexistent 1900-02-29 into a system that never had it.
Excel stores no negative serial in either system, so this affects only
dates neither can represent, where the value returned here is the one
datetime ( E , 'ConvertFrom', 'excel1904') converts back
exactly.

The time zone of a zoned T is ignored; its wall-clock components
are used. Not-A-Time ( NaT ) values are returned as NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Convert datetime array to Excel serial date numbers.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
datetime.ge


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 568
datetime: TF = ge ( A , B )

Greater-than-or-equal comparison for datetime arrays.

TF = ge ( A , B ) is the equivalent of the syntax
TF = A >= B and returns a logical array set to
true where the corresponding element of A is a later or
equal point in time to that of B , and false otherwise.

Both operands must be datetime arrays and either both have a time zone or
both be unzoned; zoned arrays are compared by their absolute instants, so
the two time zones may differ. A and B must be size
compatible. Not-A-Time compares as false against anything, just
like NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Greater-than-or-equal comparison for datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
datetime.gt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 551
datetime: TF = gt ( A , B )

Greater-than comparison for datetime arrays.

TF = gt ( A , B ) is the equivalent of the syntax
TF = A > B and returns a logical array set to
true where the corresponding element of A is a later point
in time than that of B , and false otherwise.

Both operands must be datetime arrays and either both have a time zone or
both be unzoned; zoned arrays are compared by their absolute instants, so
the two time zones may differ. A and B must be size
compatible. Not-A-Time compares as false against anything, just
like NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Greater-than comparison for datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
datetime.histcounts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2583
datetime: N = histcounts ( T )
datetime: N = histcounts ( T , nbins )
datetime: N = histcounts ( T , edges )
datetime: N = histcounts (&hellip;, Name , Value )
datetime: [ N , edges ] = histcounts (&hellip;)
datetime: [ N , edges , bin ] = histcounts (&hellip;)

Histogram bin counts for datetimes.

N = histcounts ( T ) bins the datetimes in T ,
chosen automatically, and returns the number of elements in each bin.
T is treated as T (:) and NaT elements are
excluded.

N = histcounts ( T , nbins ) and
N = histcounts ( T , edges ) bin by count and by
explicit datetime edges respectively.

'BinWidth' takes a scalar duration or
calendarDuration and, as an Octave extension , any of
the unit names listed for discretize ; MATLAB accepts only the
two classes here and requires 'BinMethod' for a named unit.
The two spellings give identical results, so
histcounts ( T , 'BinWidth', 'day') is simply another way of
writing histcounts ( T , 'BinMethod', 'day') &ndash; and note
that neither is the same as 'BinWidth', days (1) , for the reason
given below. 'BinLimits' takes a two-element datetime ,
and 'BinEdges' a datetime vector.
'BinMethod' accepts 'auto' , 'scott' ,
'fd' , 'sturges' and 'sqrt' , and any of the named
calendar units listed for discretize , but not
'integers' , which has no meaning for a datetime.

'Normalization' accepts 'count' , 'cumcount' ,
'probability' , 'percentage' and 'cdf' .
'countdensity' and 'pdf' are not accepted, since a
density per unit time has no meaning here.

As for discretize , a named unit or a calendarDuration
width begins at local midnight and so varies in length across a
daylight-saving transition, while a duration width is a fixed
span of elapsed time whatever its length, and an empty T anchors
the edges on the epoch rather than on the current clock as MATLAB does.
The same paragraph on named units also applies: where a zone shifts by
less than one bin unit, an element landing mid-unit past the transition
gets a bin of its own, so N always sums to the number of finite
elements. MATLAB can leave such an element out of every bin, and its
counts then sum to less.

A bin width below a second carries a little noise in its edges. An
instant is counted in seconds from 1970 and so runs to about 1.7e9, where
a double resolves to some 2e-7 of a second; a width of, say, 0.4 s
therefore lands its edges within a few hundred nanoseconds of the exact
grid rather than on it. The opening edge is exact, the drift is in the
step, and it is a limit of the representation rather than of the
placement.

See also:
discretize ,
histcounts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Histogram bin counts for datetimes.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
datetime.hms


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 422
datetime: [ h , m , s ] = hms ( T )

Hour, Minute, and Second components of a datetime array.

[ h , m , s ] = hms ( T ) returns the hour,
minute, and second components of the corresponding datetime values in
T as separate numeric arrays. h and m contain integer
values and s may also contain a fractional part. All outputs have
the same size as T . Not-A-Time ( NaT ) values in T are
returned as NaN in the output arrays.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Hour, Minute, and Second components of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.horzcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 376
datetime: C = horzcat ( A , B , &hellip;)

Horizontal concatenation of datetime arrays.

C = horzcat ( A , B , &hellip; is the equivalent of
the syntax B = [ A , B , &hellip;] and horizontally
concatenates the inputs A , B , &hellip;, which must have the
same size except along the second dimension. See cat for which
inputs are accepted and how their time zones are resolved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Horizontal concatenation of datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.hour


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 332
datetime: h = hour ( T )

Hour component of a datetime array.

h = hour ( T ) returns the hour number for each element
of the input datetime array T . The output h is a
double array containing integer values in the range
[0, 23] and it has the same size as T . Not-A-Time
( NaT ) values in T are returned as NaN in the output
array.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Hour component of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.interp1


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 971
datetime: VI = interp1 ( X , V , XI )
datetime: VI = interp1 (&hellip;, method )
datetime: VI = interp1 (&hellip;, method , extrap )

One-dimensional interpolation involving datetime arrays.

VI = interp1 ( X , V , XI ) interpolates to
find VI , the values of the underlying function V = f
( X ) at the query points XI . Datetime arrays are handled by
interpolating on their absolute (POSIX) instants:

When the sample points X are a datetime array, the query
points XI must also be a datetime array, and vice versa.
When the sampled values V are a datetime array, VI is a
datetime array carrying the time zone and display format of V ;
otherwise VI is numeric.

The optional method ( 'linear' by default) and extrap
arguments are passed to the built-in interp1 (see its
documentation for the supported interpolation methods and extrapolation
options). Query points outside the range of X , and Not-A-Time
query points, yield NaN or NaT unless extrapolation is
requested.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
One-dimensional interpolation involving datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.intersect


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1291
datetime: C = intersect ( A , B )
datetime: C = intersect ( A , B , 'rows' )
datetime: C = intersect (&hellip;, order )
datetime: [ C , ixA , ixB ] = intersect (&hellip;)

Set intersection of two datetime arrays.

C = intersect ( A , B ) returns the unique datetime
values common to both A and B . Either input may instead be a
date/time character vector, string array, or cell array of character
vectors, which is promoted to a datetime array before the operation.
Membership is decided on the absolute instant, so two zoned inputs may be
in different time zones; the result carries the time zone and display
format of A . Not-A-Time ( NaT ) elements are treated like
NaN and never match. C is a row vector when both A
and B are row vectors and a column vector otherwise.

C = intersect ( A , B , 'rows' ) treats each
row of the datetime matrices A and B , which must have the
same number of columns, as a single element and returns their common
rows.

&hellip; = intersect (&hellip;, order ) returns the values in
'sorted' order (the default) or in 'stable' order, i.e.
the order in which they appear in A .

[ C , ixA , ixB ] = intersect (&hellip;) also returns
index vectors ixA and ixB such that C =
A ( ixA ) and C = B ( ixB ) , or the
corresponding row selections when 'rows' is used.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Set intersection of two datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.ipermute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 483
datetime: A = ipermute ( B , dims )

Inverse of the generalized transpose for a datetime N-D array.

A = ipermute ( B , dims ) returns the inverse of
the generalized transpose performed by the permute function. The
expression ipermute (permute ( A , dims ), dims )
returns the original array A .

dims must index all the dimensions 1:ndims ( B ) of the
input array B , in any order, but only once. The dimension of
B specified in dims ( N ) gets remapped to the
N th dimension of A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Inverse of the generalized transpose for a datetime N-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.isbetween


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 962
datetime: TF = isbetween ( X , lower , upper )
datetime: TF = isbetween ( X , lower , upper , intervalType )

Determine which datetime values lie within an interval.

TF = isbetween ( X , lower , upper ) returns a
logical array TF , the same size as the broadcast of its inputs,
containing true where the element of X lies between the
corresponding lower and upper bounds. lower and
upper may each be a datetime array or a date/time character vector,
string array, or cell array of character vectors, and either may be
scalar to broadcast against X . The comparison is made on the
absolute instant, so zoned inputs may be in different time zones. A
Not-A-Time element in any input makes the corresponding result
false .

TF = isbetween ( X , lower , upper ,
intervalType ) selects which endpoints are included.
intervalType is 'closed' (the default,
lower X upper ), 'open'
(both endpoints excluded), 'openleft' (exclude lower ), or
'openright' (exclude upper ).


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Determine which datetime values lie within an interval.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.iscolumn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 303
datetime: TF = iscolumn ( T )

Return true if datetime array is a column vector.

TF = iscolumn ( T ) returns a logical scalar TF ,
which is true , if the datetime array T is a column
vector, and false otherwise. A column vector is a 2-D array for
which size ( X ) returns [ N , 1] with non-negative
N .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Return true if datetime array is a column vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
datetime.isdst


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 413
datetime: TF = isdst ( T )

Determine which datetime values fall in daylight saving time.

TF = isdst ( T ) returns a logical array TF of the
same size as the input datetime array T , where each element is
true if the corresponding datetime falls within daylight saving
time in its time zone, and false otherwise. If T has no
time zone, or for Not-A-Time ( NaT ) values, the corresponding
element of TF is false .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Determine which datetime values fall in daylight saving time.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.isempty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 190
datetime: TF = isempty ( T )

Return true if datetime array is empty.

TF = isempty ( T ) returns a logical scalar TF ,
which is true , if the datetime array T is empty, and
false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Return true if datetime array is empty.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.isequal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 935
datetime: TF = isequal ( A , B )
datetime: TF = isequal ( A , B , &hellip;)

Test datetime arrays for equality.

TF = isequal ( A , B ) returns a logical scalar
TF , which is true if the datetime arrays A and
B are the same size and each pair of corresponding elements is the
same point in time, and false otherwise. As with NaN ,
Not-A-Time ( NaT ) elements are never equal, so any NaT in
either array makes the result false ; use isequaln to treat
NaT elements as equal.

Additional arrays may be supplied, as in isequal ( A , B ,
C , &hellip;) , in which case TF is true only when all
of the arrays are equal to one another. Any input argument that is not a
datetime array, or a datetime array whose time zone is not compatible
with the others (one zoned and one unzoned), makes the result
false rather than raising an error. Zoned arrays are compared by
their absolute instants, so equal instants in different time zones are
equal.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Test datetime arrays for equality.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.isequaln


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 990
datetime: TF = isequaln ( A , B )
datetime: TF = isequaln ( A , B , &hellip;)

Test datetime arrays for equality, treating Not-A-Time as equal.

TF = isequaln ( A , B ) is identical to
isequal ( A , B ) except that Not-A-Time ( NaT )
elements are treated as equal to one another, in the same way that
isequaln treats NaN . It returns a logical scalar
TF , which is true if the datetime arrays A and
B are the same size and each pair of corresponding elements is
either the same point in time or both NaT , and false
otherwise.

Additional arrays may be supplied, as in isequaln ( A ,
B , C , &hellip;) , in which case TF is true only
when all of the arrays are equal to one another. Any input argument that
is not a datetime array, or a datetime array whose time zone is not
compatible with the others (one zoned and one unzoned), makes the result
false rather than raising an error. Zoned arrays are compared by
their absolute instants, so equal instants in different time zones are
equal.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
Test datetime arrays for equality, treating Not-A-Time as equal.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.isfinite


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 310
datetime: out = isfinite ( T )

Test for finite elements in datetime array.

TF = isfinite ( T ) returns a logical array TF of
the same size as T containing true for each corresponding
element of T that is finite and false otherwise. Finite
elements in datetime arrays are those which are neither Inf nor
NaT .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Test for finite elements in datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
datetime.isinf


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 231
datetime: out = isinf ( T )

Test for infinite elements in datetime array.

TF = isinf ( T ) returns a logical array TF of the
same size as T containing true for each corresponding
element of T that is infinite and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Test for infinite elements in datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.ismatrix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 328
datetime: TF = ismatrix ( T )

Return true if datetime array is a 2-D array.

TF = ismatrix ( T ) returns a logical scalar TF ,
which is true , if the datetime array T is a matrix, and
false otherwise. A matrix is an array of any type where
ndims ( X ) == 2 and for which size ( X ) returns
[ H , W ] with non-negative H and W .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Return true if datetime array is a 2-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.ismember


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1310
datetime: TF = ismember ( A , B )
datetime: TF = ismember ( A , B , 'rows' )
datetime: [ TF , index ] = ismember (&hellip;)

Test for datetime elements in a set.

TF = ismember ( A , B ) returns a logical array
TF of the same size as A containing true for each
corresponding element of A that is in B and false
otherwise. Either input may instead be a date/time character vector,
string array, or cell array of character vectors, which is promoted to a
datetime array before the test. Membership is decided on the absolute
instant, so two zoned inputs may be in different time zones. Similarly
to NaN values, Not-A-Time ( NaT ) elements are not equal
with each other and always return false .

TF = ismember ( A , B , 'rows' ) only
applies to datetime matrices with the same number of columns, in which
case the logical vector TF contains true for each row of
A that is also a row in B . TF has the same number of
rows as A .

[ TF , index ] = ismember ( A , B ) also returns
an index array of the same size as A containing the lowest index in
B for each element of A that is a member of B and 0
otherwise. If the 'rows' optional argument is used, then the
returning index is a column vector with the same rows as A and it
contains the lowest index in B for each row of A that is a
member of B and 0 otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Test for datetime elements in a set.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.ismissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 166
datetime: TF = ismissing ( T )
datetime: TF = ismissing ( T , indicator )

Test for missing elements in datetime array.

TF is a logical array of the same size as T .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Test for missing elements in datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
datetime.isnat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 345
datetime: TF = isnat ( T )

Test for Not-A-Time elements in datetime array.

TF = isnat ( T ) returns a logical array TF of the
same size as T containing true for each corresponding
element of T that is Not-A-Time ( NaT ) and false
otherwise. NaT is the equivalent of NaN in numeric
arrays.

If T is not a datetime array, isnat returns an error.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Test for Not-A-Time elements in datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.isregular


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1397
datetime: tf = isregular ( T )
datetime: tf = isregular ( T , unit )
datetime: [ tf , dt ] = isregular (&hellip;)

Determine whether a datetime vector is regularly spaced.

tf = isregular ( T ) returns true if the
elements of the datetime vector T are equally spaced in time, and
false otherwise. A scalar or empty T , or one containing a
Not-A-Time ( NaT ) value, is not regular. Neither is a T
that does not move: a step of zero describes no spacing, so a vector of
repeated instants is not regularly spaced.

tf = isregular ( T , unit ) tests for regular
spacing with respect to unit , which may be 'time' (the
default), 'years' , 'quarters' , 'months' ,
'weeks' , or 'days' . With a calendar unit, T is
regular when successive elements differ by the same whole number of that
unit, which &ndash; unlike 'time' &ndash; accounts for varying month
lengths and daylight saving time.

[ tf , dt ] = isregular (&hellip;) also returns the common
time step dt . For 'time' it is a duration ; for a
calendar unit it is a calendarDuration . When T is not
regular, dt is NaN .

Steps are compared as stored, to the microsecond this class keeps. A
spacing that differs by less than that cannot be seen and reads as
regular, while one that rounds differently at the microsecond &ndash; thirds
of a second, say &ndash; reads as irregular. MATLAB stores instants more
finely and so draws that line elsewhere.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Determine whether a datetime vector is regularly spaced.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
datetime.isrow


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 287
datetime: TF = isrow ( T )

Return true if datetime array is a row vector.

TF = isrow ( T ) returns a logical scalar TF ,
which is true , if the datetime array T is a row vector,
and false otherwise. A row vector is a 2-D array for which
size ( X ) returns [1, N ] with non-negative
N .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Return true if datetime array is a row vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.isscalar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 277
datetime: TF = isscalar ( T )

Return true if datetime array is a scalar.

TF = isscalar ( T ) returns a logical scalar TF ,
which is true , if the datetime array T is also a scalar,
and false otherwise. A scalar is a single element object for
which size ( X ) returns [1, 1] .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Return true if datetime array is a scalar.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.issorted


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1112
datetime: TF = issorted ( A )
datetime: TF = issorted ( A , dim )
datetime: TF = issorted ( A , direction )
datetime: TF = issorted ( A , dim , direction )

Determine whether a datetime array is sorted.

TF = issorted ( A ) returns true if the elements
of the datetime array A are sorted in ascending (non-decreasing)
order along its first non-singleton dimension, and false
otherwise. For a matrix, every column (or row, depending on the
operating dimension) must be sorted for TF to be true .
Not-A-Time ( NaT ) elements are treated as greater than any other
value, so an array is sorted in ascending order only when its NaT
elements come last.

TF = issorted ( A , dim ) operates along dimension
dim .

TF = issorted ( A , direction ) tests whether the
elements are sorted according to direction , which may be one of:

'ascend' (default) tests non-decreasing order.
'descend' tests non-increasing order.
'monotonic' tests non-decreasing or non-increasing order.
'strictascend' tests strictly increasing order.
'strictdescend' tests strictly decreasing order.
'strictmonotonic' tests strictly monotonic order.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Determine whether a datetime array is sorted.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
datetime.issortedrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1213
datetime: TF = issortedrows ( A )
datetime: TF = issortedrows ( A , column )
datetime: TF = issortedrows ( A , direction )
datetime: TF = issortedrows ( A , column , direction )

Determine whether the rows of a datetime array are sorted.

TF = issortedrows ( A ) returns true if the rows
of the 2-D datetime array A are sorted in ascending order, i.e.
lexicographically by the first column, ties broken by the second column,
and so on, and false otherwise. Not-A-Time ( NaT )
elements are treated as greater than any other value.

TF = issortedrows ( A , column ) checks the order
using only the columns listed in column , in the given priority. A
negative entry checks the corresponding column for descending order.

TF = issortedrows ( A , direction ) checks for the
order given by direction , which may be one of 'ascend'
(default), 'descend' , 'monotonic' ,
'strictascend' , 'strictdescend' , or
'strictmonotonic' . It may also be a cell array of
'ascend' / 'descend' strings, one per sort column. For the
strict options a matrix qualifies only when its first sort column is
strictly monotonic and free of NaT .

TF = issortedrows ( A , column , direction )
combines an explicit column list with a direction .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Determine whether the rows of a datetime array are sorted.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.isvector


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 341
datetime: TF = isvector ( T )

Return true if datetime array is a vector.

TF = isvector ( T ) returns a logical scalar TF ,
which is true if the datetime array T is a vector and
false otherwise. A vector is a 2-D array for which one of the
dimensions is equal to 1 (either 1&times;N or N&times;1 ). By
definition, a scalar is also a vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Return true if datetime array is a vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.isweekend


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 330
datetime: TF = isweekend ( T )

Determine which datetime values fall on a weekend.

TF = isweekend ( T ) returns a logical array TF of
the same size as the input datetime array T , where each element is
true if the corresponding datetime falls on a Saturday or Sunday,
and false otherwise. Not-A-Time ( NaT ) values return
false .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Determine which datetime values fall on a weekend.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
datetime.juliandate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1110
datetime: J = juliandate ( T )
datetime: J = juliandate ( T , dateType )

Convert datetime array to Julian dates.

J = juliandate ( T ) returns a double array
J of the same size as T holding the Julian date of each
element, that is, the number of days (including a fractional part) since
noon UTC on January 1, 4713 BCE. Unlike datenum , the result is
based on the absolute UTC instant, so the time zone of a zoned T is
taken into account; datetime arrays without a time zone are treated as
UTC. Not-A-Time ( NaT ) values are returned as NaN .

J = juliandate ( T , dateType ) selects the kind of
Julian date: 'juliandate' (default) or
'modifiedjuliandate' , the latter being the Julian date minus
2400000.5 .

For a 'UTCLeapSeconds' array a Julian day that holds an inserted
second is 86401 seconds long, and the fractional part is that fraction of
the day&rsquo;s true length. Julian days run from noon to noon and modified
Julian days from midnight to midnight, so on such a day the two are
stretched over different spans and are not related by exactly
2400000.5 ; both are 'juliandate' for the day at hand.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Convert datetime array to Julian dates.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.keyHash


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1294
datetime: key = keyHash ( T )
datetime: key = keyHash ( T , base )

Generate a hash code for datetime array.

key = keyHash ( T ) generates a uint64 scalar
that represents the input array T . keyHash utilizes the
64-bit FNV-1a variant of the Fowler-Noll-Vo non-cryptographic hash
function.

key = keyHash ( T , base ) also generates a 64-bit
hash code using base as the offset basis for the FNV-1a hash
algorithm. base must be a uint64 integer type scalar. Use
this syntax to cascade keyHash on multiple objects for which a
single hash code is required.

A datetime array is keyed on the instant its elements name and
not on their wall clock and time zone, so the same moment expressed in
two zones has the same hash code. An unzoned array, a zoned array and
a leap-second array are three separate frames that never share a key,
whatever instants they name, and the two instants sharing a wall clock
across a daylight-saving fall-back stay distinct. The Format
property is display only and is not part of the key. Two arrays that
keyMatch reports as the same key always hash alike.

Note that unlike MATLAB, this implementation does not use any random
seed. As a result, keyHash will always generate the exact same
hash key for any particular input across different workers and Octave
sessions.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Generate a hash code for datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
datetime.le


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 568
datetime: TF = le ( A , B )

Less-than-or-equal comparison for datetime arrays.

TF = le ( A , B ) is the equivalent of the syntax
TF = A <= B and returns a logical array set to
true where the corresponding element of A is an earlier or
equal point in time to that of B , and false otherwise.

Both operands must be datetime arrays and either both have a time zone or
both be unzoned; zoned arrays are compared by their absolute instants, so
the two time zones may differ. A and B must be size
compatible. Not-A-Time compares as false against anything, just
like NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Less-than-or-equal comparison for datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
datetime.length


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 226
datetime: N = length ( T )

Length of a datetime vector.

N = length ( T ) returns the size of the longest
dimension of the datetime array T , unless any of its dimensions
has zero length, in which case length ( T ) returns 0.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Length of a datetime vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.linspace


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1047
datetime: R = linspace ( A , B )
datetime: R = linspace ( A , B , N )

Create linearly spaced datetime values.

R = linspace ( A , B ) returns a row vector of 100
datetime values spaced equally between the scalar datetimes A and
B , both of which are included.

R = linspace ( A , B , N ) returns N
values instead of 100. A non-integer N is floored; if N is
one, B alone is returned, and if N is zero or negative the
result is empty.

The spacing is by absolute instant, so for zoned inputs it is daylight
saving aware: a span that loses an hour to a transition is divided into
equal instants, whose wall-clock readings are therefore not equally
spaced. The two endpoints may be in different time zones, in which case
the result is expressed in the zone of A , but they must either both
be zoned or both be unzoned. R carries the Format and
TimeZone of A .

A Not-A-Time endpoint makes every value that depends on it NaT ,
leaving only the opposite endpoint; an infinite endpoint likewise carries
its infinity through the values that depend on it.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Create linearly spaced datetime values.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
datetime.lt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 551
datetime: TF = lt ( A , B )

Less-than comparison for datetime arrays.

TF = lt ( A , B ) is the equivalent of the syntax
TF = A < B and returns a logical array set to
true where the corresponding element of A is an earlier
point in time than that of B , and false otherwise.

Both operands must be datetime arrays and either both have a time zone or
both be unzoned; zoned arrays are compared by their absolute instants, so
the two time zones may differ. A and B must be size
compatible. Not-A-Time compares as false against anything, just
like NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Less-than comparison for datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
datetime.max


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1132
datetime: M = max ( A )
datetime: M = max ( A , B )
datetime: M = max ( A , [], dim )
datetime: M = max (&hellip;, nanflag )
datetime: M = max ( A , [], 'all' )
datetime: [ M , I ] = max (&hellip;)

Maximum of a datetime array.

M = max ( A ) returns the largest element of the
datetime array A along its first non-singleton dimension. For a
matrix, M is a row vector with the maximum of each column.
Not-A-Time ( NaT ) elements are omitted; a reduction over
NaT elements only yields NaT .

M = max ( A , B ) returns an array the same size as
A and B (after broadcasting) holding the element-wise maximum
of the two datetime arrays.

M = max ( A , [], dim ) operates along dimension
dim . The empty second argument distinguishes this from the
element-wise form.

M = max (&hellip;, nanflag ) sets the treatment of
NaT : 'omitnan' (default) ignores NaT , while
'includenan' returns NaT whenever a NaT takes
part in the comparison.

M = max ( A , [], 'all' ) returns the largest
element of the whole array.

[ M , I ] = max (&hellip;) also returns the indices of the
maxima. A second output is not available for the element-wise form.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Maximum of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.maxk


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1396
datetime: B = maxk ( A , K )
datetime: B = maxk ( A , K , dim )
datetime: [ B , index ] = maxk ( A , &hellip;)

Find the latest elements in a datetime array.

B = maxk ( A , K ) returns the K latest
elements of the datetime array A in descending order. If A
is a vector, then B is a vector with K elements. If A
is a matrix, then maxk operates along each column of A and
B has K rows. For multidimensional arrays, maxk
operates along the first non-singleton dimension. Elements are ranked
by the instant they name, so an array with a time zone is ranked by
absolute time rather than by its wall clock.

B = maxk ( A , K , dim ) operates along the
dimension specified by dim .

K must be a nonnegative integer scalar. If K is larger than
the number of elements along the operating dimension, then all of them
are returned. Infinite datetimes are ranked as ordinary values.

Missing elements ( NaT ) are not ranked. They are appended after
the ranked elements in their original order, and hence they only appear
in B when K exceeds the number of non-missing elements along
the operating dimension. Unlike sort , maxk has no
'MissingPlacement' option, since NaT elements are always
placed last. Elements comparing as equal keep their original order.

[ B , index ] = maxk ( A , &hellip;) also returns an
index array containing the indices of the returned elements of A
along the operating dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Find the latest elements in a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.mean


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 616
datetime: M = mean ( A )
datetime: M = mean ( A , dim )
datetime: M = mean ( A , 'all' )
datetime: M = mean (&hellip;, nanflag )

Mean of a datetime array.

M = mean ( A ) returns the mean of the datetime array
A as a scalar datetime, computed as the average of the absolute
instants along the first non-singleton dimension. A dim or
'all' argument selects the dimension(s) to operate on. The
result carries the Format and TimeZone of A .

By default a Not-A-Time element makes the corresponding result
NaT ; pass 'omitnat' (equivalently 'omitmissing' )
to ignore missing values, or 'includenat' to keep the default.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Mean of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
datetime.median


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 526
datetime: M = median ( A )
datetime: M = median ( A , dim )
datetime: M = median ( A , 'all' )
datetime: M = median (&hellip;, nanflag )

Median of a datetime array.

M = median ( A ) returns the median of the datetime
array A as a datetime, computed on the absolute instants along the
first non-singleton dimension (for an even number of elements the average
of the two middle instants). A dim or 'all' argument
selects the dimension(s). The result carries the Format and
TimeZone of A . Missing-value handling matches mean .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Median of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
datetime.min


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1134
datetime: M = min ( A )
datetime: M = min ( A , B )
datetime: M = min ( A , [], dim )
datetime: M = min (&hellip;, nanflag )
datetime: M = min ( A , [], 'all' )
datetime: [ M , I ] = min (&hellip;)

Minimum of a datetime array.

M = min ( A ) returns the smallest element of the
datetime array A along its first non-singleton dimension. For a
matrix, M is a row vector with the minimum of each column.
Not-A-Time ( NaT ) elements are omitted; a reduction over
NaT elements only yields NaT .

M = min ( A , B ) returns an array the same size as
A and B (after broadcasting) holding the element-wise minimum
of the two datetime arrays.

M = min ( A , [], dim ) operates along dimension
dim . The empty second argument distinguishes this from the
element-wise form.

M = min (&hellip;, nanflag ) sets the treatment of
NaT : 'omitnan' (default) ignores NaT , while
'includenan' returns NaT whenever a NaT takes
part in the comparison.

M = min ( A , [], 'all' ) returns the smallest
element of the whole array.

[ M , I ] = min (&hellip;) also returns the indices of the
minima. A second output is not available for the element-wise form.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Minimum of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.mink


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1399
datetime: B = mink ( A , K )
datetime: B = mink ( A , K , dim )
datetime: [ B , index ] = mink ( A , &hellip;)

Find the earliest elements in a datetime array.

B = mink ( A , K ) returns the K earliest
elements of the datetime array A in ascending order. If A
is a vector, then B is a vector with K elements. If A
is a matrix, then mink operates along each column of A and
B has K rows. For multidimensional arrays, mink
operates along the first non-singleton dimension. Elements are ranked
by the instant they name, so an array with a time zone is ranked by
absolute time rather than by its wall clock.

B = mink ( A , K , dim ) operates along the
dimension specified by dim .

K must be a nonnegative integer scalar. If K is larger than
the number of elements along the operating dimension, then all of them
are returned. Infinite datetimes are ranked as ordinary values.

Missing elements ( NaT ) are not ranked. They are appended after
the ranked elements in their original order, and hence they only appear
in B when K exceeds the number of non-missing elements along
the operating dimension. Unlike sort , mink has no
'MissingPlacement' option, since NaT elements are always
placed last. Elements comparing as equal keep their original order.

[ B , index ] = mink ( A , &hellip;) also returns an
index array containing the indices of the returned elements of A
along the operating dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Find the earliest elements in a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
datetime.minus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1318
datetime: C = minus ( A , B )

Subtraction for datetime arrays.

C = minus ( A , B ) is the equivalent of the syntax
C = A - B and supports the following operand
combinations.

datetime - datetime returns a duration array holding
the elapsed time between the corresponding elements. Both operands must
either both have a time zone or both be unzoned; a zoned difference is
computed from the absolute instants, so the two time zones may differ.
datetime - duration returns a datetime array shifted
earlier by a fixed number of 24-hour days. For a zoned array the shift
is applied to the absolute instant, so it is aware of daylight saving
time transitions.
datetime - calendarDuration returns a datetime array
shifted earlier in calendar units. Whole months (and years) are applied
first, clamping the day of month to the last day of the target month when
necessary (e.g. 31 March minus one month is 28 February), then whole
calendar days, and finally the time-of-day component as an instant.
datetime - X , where X is a numeric or logical array,
treats the elements of X as a number of fixed 24-hour days.

A and B must be size compatible: they can be the same size,
one can be scalar, or for every dimension their sizes must be equal or
one of them must be 1. Not-A-Time and infinite elements propagate to the
result.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Subtraction for datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
datetime.minute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 340
datetime: m = minute ( T )

Minute component of a datetime array.

m = minute ( T ) returns the minute number for each
element of the input datetime array T . The output m is a
double array containing integer values in the range
[0, 59] and it has the same size as T . Not-A-Time
( NaT ) values in T are returned as NaN in the output
array.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Minute component of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.mode


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 641
datetime: M = mode ( A )
datetime: M = mode ( A , dim )
datetime: M = mode ( A , 'all' )
datetime: [ M , F , C ] = mode (&hellip;)

Most frequent value of a datetime array.

M = mode ( A ) returns the most frequently occurring
datetime in A along the first non-singleton dimension; when several
values are equally frequent the smallest is returned. A dim or
'all' argument selects the dimension(s). Not-A-Time elements are
ignored. The result carries the Format and TimeZone of
A .

[ M , F , C ] = mode (&hellip;) also returns the
frequency F of the modal value and a cell array C whose
elements list all values that achieve that frequency.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Most frequent value of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
datetime.month


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 831
datetime: M = month ( T )
datetime: M = month ( T , monthType )

Month component of a datetime array.

M = month ( T ) returns the month number for each
element of the input datetime array T . The output M is a
double array containing integer values in the range
[1, 12] and it has the same size as T . Not-A-Time
( NaT ) values in T are returned as NaN in the output
array.

M = month ( T , monthType ) returns the month
number or name for each element of the input datetime array T as
specified by monthType , which may have any of the following
options:

'monthofyear' (default) returns the month number in a
numeric array.
'name' returns the corresponding full name of the month in
a cell array of character vectors.
'shortname' returns the corresponding 3-letter abbreviation
of the month in a cell array of character vectors.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Month component of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
datetime.ndims


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 148
datetime: out = ndims ( T )

Number of dimensions in a datetime array.

out = ndims ( T ) returns the number of dimensions of
the datetime array T .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Number of dimensions in a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
datetime.ne


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 612
datetime: TF = ne ( A , B )

Inequality comparison for datetime arrays.

TF = ne ( A , B ) is the equivalent of the syntax
TF = A != B and returns a logical array set to
true where the corresponding elements of A and B are
not the same point in time, and false otherwise.

Both operands must be datetime arrays and either both have a time zone or
both be unzoned; zoned arrays are compared by their absolute instants, so
the two time zones may differ. A and B must be size
compatible. Not-A-Time is never equal to anything, so it compares as
true against everything, including another Not-A-Time, just like
NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Inequality comparison for datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
datetime.numel


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 203
datetime: out = numel ( T )

Total number of elements in a datetime array.

out = numel ( T ) returns the number of elements in the
datetime array T , which is the product of the sizes of its
dimensions.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Total number of elements in a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.permute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 441
datetime: B = permute ( A , dims )

Generalized transpose for a datetime N-D array.

B = permute ( A , dims ) returns the generalized
transpose of the datetime array A by rearranging its dimensions
according to the permutation vector specified in dims .

dims must index all the dimensions 1:ndims ( A ) of the
input array A , in any order, but only once. The N th
dimension of A gets remapped to the dimension in B specified
by dims ( N ) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Generalized transpose for a datetime N-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.plus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1123
datetime: C = plus ( A , B )

Addition for datetime arrays.

C = plus ( A , B ) is the equivalent of the syntax
C = A + B and supports the following operand
combinations, in either order.

datetime + duration returns a datetime array shifted
later by a fixed number of 24-hour days. For a zoned array the shift is
applied to the absolute instant, so it is aware of daylight saving time
transitions.
datetime + calendarDuration returns a datetime array
shifted later in calendar units. Whole months (and years) are applied
first, clamping the day of month to the last day of the target month when
necessary (e.g. 31 January plus one month is 28 February), then whole
calendar days, and finally the time-of-day component as an instant.
datetime + X , where X is a numeric or logical array,
treats the elements of X as a number of fixed 24-hour days.

Adding two datetime arrays is not defined and raises an error. A
and B must be size compatible: they can be the same size, one can
be scalar, or for every dimension their sizes must be equal or one of
them must be 1. Not-A-Time and infinite elements propagate to the
result.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Addition for datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.posixtime


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 728
datetime: P = posixtime ( T )

Convert datetime array to POSIX time.

P = posixtime ( T ) returns the number of seconds
elapsed since the epoch 1970-01-01 00:00:00 UTC for each element
of the input datetime array T . The output P is a
double array of the same size as T and includes any
fractional seconds. Datetime arrays without a time zone are treated as
UTC. Not-A-Time ( NaT ) values are returned as NaN .

POSIX time has no stamp of its own for an inserted leap second, so for a
'UTCLeapSeconds' array the 60th second of a minute shares the
stamp of the second that follows it: posixtime of
2016-12-31T23:59:60Z and of 2017-01-01T00:00:00Z are both
1483228800 . Every other conversion folds the other way (see
convertTo ).


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Convert datetime array to POSIX time.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.quarter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 343
datetime: Q = quarter ( T )

Quarter component of a datetime array.

Q = quarter ( T ) returns the quarter number for each
element of the input datetime array T . The output Q is a
double array containing integer values in the range [1, 4]
and it has the same size as T . Not-A-Time ( NaT ) values in
T are returned as NaN in the output array.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Quarter component of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.repelem


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 966
datetime: B = repelem ( A , n )
datetime: B = repelem ( A , d1 , &hellip;, dN )

Repeat copies of datetime array elements.

B = repelem ( A , n ) returns a datetime vector
B containing repeated elements of the input A , which must be
a datetime vector. If n is a scalar, each element of A is
repeated n times along the non-singleton dimension of A . If
n is a vector, it must have the same elements as A , in which
case it specifies the number of times to repeat each corresponding
element of A .

B = repelem ( A , d1 , &hellip;, dN ) returns
an array B with each element of A repeated according to the
the list of input arguments d1 , &hellip;, dN each
corresponding to a different dimension 1:ndims ( A ) of the
input array A . d1 , &hellip;, dN must be either scalars
or vectors with the same length as the corresponding dimension of
A containing non-negative integer values specifying the number of
repetitions of each element along the corresponding dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Repeat copies of datetime array elements.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.repelems


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 461
datetime: B = repelems ( A , R )

Construct a vector of repeated elements from a datetime array.

B = repelems ( A , R ) returns a datetime vector
B containing repeated elements of the input A , which must be
a datetime vector. R must be a 2&times;N matrix of integers.
Entries in the first row of R correspond to the linear indexing of
the elements in A to be repeated. The corresponding entries in the
second row of R specify the repeat count of each element.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Construct a vector of repeated elements from a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
datetime.repmat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 610
datetime: B = repmat ( A , n )
datetime: B = repmat ( A , d1 , &hellip;, dN )
datetime: B = repmat ( A , dimvec )

Repeat copies of a datetime array.

B = repmat ( A , n ) returns a datetime array
B containing n copies of the input datetime array A
along every dimension of A .

B = repmat ( A , d1 , &hellip;, dN ) returns an
array B containing copies of A along the dimensions specified
by the list of scalar integer values d1 , &hellip;, dN , which
specify how many copies of A are made in each dimension.

B = repmat ( A , dimvec ) is equivalent to the
previous syntax with dimvec = [ d1 , &hellip;, dN ] .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Repeat copies of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.reshape


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 752
datetime: B = reshape ( A , d1 , &hellip;, dN )
datetime: B = reshape ( A , &hellip;, [] , &hellip;)
datetime: B = reshape ( A , dimvec )

Reshape datetime array.

B = reshape ( A , d1 , &hellip;, dN ) returns
a datetime array B with specified dimensions d1 , &hellip;,
dN , whose elements are taken columnwise from the datetime array
A . The product of d1 , &hellip;, dN must equal the total
number of elements in A .

B = reshape ( A , &hellip;, [] , &hellip;) returns
a datetime array B with one dimension unspecified which is
calculated automatically so that the product of dimensions in B
matches the total elements in A , which must be divisible the
product of specified dimensions. An empty matrix ([]) is used to
flag the unspecified dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Reshape datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
datetime.second


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 790
datetime: s = second ( T )
datetime: s = second ( T , secondType )

Seconds component of a datetime array.

s = second ( T ) returns the number of seconds for each
element of the input datetime array T . The output s is a
double array containing values in the range [0, 60) ,
including any fractional part of the second, and it has the same size as
T . Not-A-Time ( NaT ) values in T are returned as
NaN in the output array.

s = second ( T , secondType ) returns the seconds
for each element of the input datetime array T as specified by
secondType , which may have any of the following options:

'secondofminute' (default) returns the second of the minute
in a numeric array, in the range [0, 60) .
'secondofday' returns the second of the day in a numeric
array, in the range [1, 86400) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Seconds component of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
datetime.setDefaultFormats


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1594
datetime: datetime.setDefaultFormats ( 'default' , fmt )
datetime: datetime.setDefaultFormats ( 'defaultdate' , fmt )
datetime: datetime.setDefaultFormats ( 'reset' )

Set the default display formats of datetime arrays.

A datetime array whose Format property was never set explicitly
displays with one of two default formats, and this method chooses them.
The choice between the two is made from the values: an array whose
elements all sit at midnight uses the date-only default, and any other
array uses the date-and-time default. The choice is made afresh on every
display, so an array moves between the two when its components change.

datetime.setDefaultFormats ( 'default' , fmt ) sets the
date-and-time default to fmt , and
datetime.setDefaultFormats ( 'defaultdate' , fmt ) sets
the date-only default. fmt is a display format, given as a
character vector or string scalar, and is validated as the Format
property is. Arrays that already exist take the new format on their next
display; those with an explicitly set Format are unaffected.

datetime.setDefaultFormats ( 'reset' ) restores both factory
formats, 'dd-MMM-uuuu HH:mm:ss' and 'dd-MMM-uuuu' .

Both formats persist across Octave sessions.

Deviation from MATLAB. MATLAB accepts a second argument after
'reset' and silently ignores it, resetting both defaults whatever
it says, so datetime.setDefaultFormats ('reset', 'default') reads
as a request to reset one and quietly resets two. Anything at all is
accepted there, a number included. Here that is an error, since no
correct program can depend on the argument being ignored.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Set the default display formats of datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.setdiff


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1205
datetime: C = setdiff ( A , B )
datetime: C = setdiff ( A , B , 'rows' )
datetime: C = setdiff (&hellip;, order )
datetime: [ C , ixA ] = setdiff (&hellip;)

Set difference of two datetime arrays.

C = setdiff ( A , B ) returns the unique datetime
values in A that are not in B . Either input may instead be a
date/time character vector, string array, or cell array of character
vectors, which is promoted to a datetime array before the operation.
Membership is decided on the absolute instant, so two zoned inputs may be
in different time zones; the result carries the time zone and display
format of A . NaT elements in A are all retained, as
they never match an element of B . C is a row vector when
both A and B are row vectors and a column vector otherwise.

C = setdiff ( A , B , 'rows' ) treats each
row of the datetime matrices A and B , which must have the
same number of columns, as a single element and returns the rows of
A that are not rows of B .

&hellip; = setdiff (&hellip;, order ) returns the values in
'sorted' order (the default) or in 'stable' order.

[ C , ixA ] = setdiff (&hellip;) also returns an index
vector ixA such that C = A ( ixA ) , or
C = A ( ixA ,:) when 'rows' is used.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Set difference of two datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
datetime.setxor


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1254
datetime: C = setxor ( A , B )
datetime: C = setxor ( A , B , 'rows' )
datetime: C = setxor (&hellip;, order )
datetime: [ C , ixA , ixB ] = setxor (&hellip;)

Set exclusive-or of two datetime arrays.

C = setxor ( A , B ) returns the unique datetime
values that are in A or in B but not in both. Either input
may instead be a date/time character vector, string array, or cell array
of character vectors, which is promoted to a datetime array before the
operation. Membership is decided on the absolute instant, so two zoned
inputs may be in different time zones; the result carries the time zone
and display format of A . Distinct NaT elements are all
retained. C is a row vector when both A and B are row
vectors and a column vector otherwise.

C = setxor ( A , B , 'rows' ) treats each
row of the datetime matrices A and B , which must have the
same number of columns, as a single element and returns the rows that are
in one input but not both.

&hellip; = setxor (&hellip;, order ) returns the values in
'sorted' order (the default) or in 'stable' order.

[ C , ixA , ixB ] = setxor (&hellip;) also returns
index vectors ixA and ixB such that C is the
combination of A ( ixA ) and B ( ixB ) ,
or the corresponding row selections when 'rows' is used.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Set exclusive-or of two datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1060
datetime: sz = size ( T )
datetime: dim_sz = size ( T , dim )
datetime: dim_sz = size ( T , d1 , d2 , &hellip;)
datetime: [ rows , columns , &hellip;, dim_n_sz ] = size (&hellip;)

Size of a datetime array.

sz = size ( T ) returns a row vector with the size
(number of elements) of each dimension for the datetime array T .

dim_sz = size ( T , dim ) returns the size of
the corresponding dimension specified in dim . If dim is a
vector, then dim_sz is a vector of the same length and with each
element corresponding to a specified dimension. Multiple dimensions may
also be specified as separate arguments.

With a single output argument, size returns a row vector. With
several, the size of dimension N is returned in the Nth argument.
Asking for fewer output arguments than the array has dimensions folds
the trailing dimensions into the last one, so [r, c] = size
( T ) on a 2-by-2-by-2 array returns 2 and 4; asking for more pads
with ones. When a dimension is named, however, the number of output
arguments must equal the number of dimensions requested.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Size of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.sort


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1041
datetime: B = sort ( A )
datetime: B = sort ( A , dim )
datetime: B = sort ( A , direction )
datetime: B = sort ( A , dim , direction )
datetime: B = sort (&hellip;, 'MissingPlacement' , mp )
datetime: [ B , I ] = sort (&hellip;)

Sort a datetime array.

B = sort ( A ) returns the elements of the datetime
array A sorted in ascending order along its first non-singleton
dimension. For a matrix, each column is sorted independently. Sorting
is stable: elements that compare as equal keep their original relative
order.

B = sort ( A , dim ) sorts along dimension
dim .

B = sort ( A , direction ) sorts in the order given
by direction , which is either 'ascend' (default) or
'descend' .

B = sort (&hellip;, 'MissingPlacement' , mp )
controls where Not-A-Time ( NaT ) elements are placed. mp
may be 'auto' (default; NaT last for ascending order and
first for descending order), 'first' , or 'last' .

[ B , I ] = sort (&hellip;) also returns an index array
I of the same size as A such that B is A indexed
by I along the operating dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Sort a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.sortrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1466
datetime: B = sortrows ( A )
datetime: B = sortrows ( A , column )
datetime: B = sortrows ( A , direction )
datetime: B = sortrows ( A , column , direction )
datetime: B = sortrows (&hellip;, 'MissingPlacement' , mp )
datetime: [ B , index ] = sortrows (&hellip;)

Sort the rows of a datetime array.

B = sortrows ( A ) sorts the rows of the 2-D datetime
array A in ascending order. Rows are ordered lexicographically: by
the first column, ties broken by the second column, and so on. The sort
is stable, so rows that compare as equal keep their original order.

B = sortrows ( A , column ) sorts using only the
columns listed in column , in the given priority. A negative entry
sorts the corresponding column in descending order. Columns not listed
are not used as sort keys.

B = sortrows ( A , direction ) sorts every column
in the given direction , either 'ascend' (default) or
'descend' . direction may also be a cell array of strings
with one such value per sort column.

B = sortrows ( A , column , direction )
combines an explicit column list with a per-column direction .

B = sortrows (&hellip;, 'MissingPlacement' , mp )
controls where Not-A-Time ( NaT ) elements are placed. mp
may be 'auto' (default; NaT sorts as the largest value,
i.e. last for ascending and first for descending columns),
'first' , or 'last' .

[ B , index ] = sortrows (&hellip;) also returns a column
index vector index that maps the rows of A to B , such
that B = A ( index , :) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Sort the rows of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
datetime.std


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 582
datetime: S = std ( A )
datetime: S = std ( A , w )
datetime: S = std ( A , w , dim )
datetime: S = std ( A , w , 'all' )
datetime: S = std (&hellip;, nanflag )
datetime: [ S , M ] = std (&hellip;)

Standard deviation of a datetime array.

S = std ( A ) returns the standard deviation of the
absolute instants of A as a duration . The weight w
selects the normalisation ( 0 , the default, divides by N-1 ;
1 divides by N ), and a dim or 'all' argument
selects the dimension(s). Missing-value handling matches mean .

[ S , M ] = std (&hellip;) also returns the mean M
as a datetime.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Standard deviation of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
datetime.string


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 451
datetime: S = string ( T )
datetime: S = string ( T , fmt )

Convert datetime array to a string array.

S = string ( T ) converts the datetime array T to
a string array S of the same size, formatting each element
with the display format of T (its Format property).
Not-A-Time ( NaT ) values become missing string elements.

S = string ( T , fmt ) formats each element with
the Unicode (LDML) format fmt instead of the Format
property of T (see char ).


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Convert datetime array to a string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.timeofday


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 489
datetime: D = timeofday ( T )

Elapsed time since midnight of a datetime array.

D = timeofday ( T ) returns the elapsed time since
midnight for each element of the input datetime array T as a
duration array D of the same size as T . For datetime
arrays with a time zone, the result accounts for any daylight saving time
shift occurring since midnight, so it may differ from the displayed clock
time on the day of a transition. Not-A-Time ( NaT ) values in
T are returned as NaN durations.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Elapsed time since midnight of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.topkrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2200
datetime: B = topkrows ( A , K )
datetime: B = topkrows ( A , K , col )
datetime: B = topkrows ( A , K , direction )
datetime: B = topkrows ( A , K , col , direction )
datetime: B = topkrows (&hellip;, 'MissingPlacement' , MP )
datetime: [ B , index ] = topkrows ( A , &hellip;)

Top K sorted rows of a datetime array.

B = topkrows ( A , K ) returns the top K rows
of the 2-D datetime array A sorted in descending order as a group.
K must be a nonnegative integer scalar. If K is larger than
the number of rows in A , then all of them are returned.

Missing elements ( NaT ) are not ranked. Within each sort
column they are placed after the elements that are defined, whichever
direction is asked for, so a row is demoted only by a missing element in
a column that actually decides its position. Rows comparing as equal
keep their original order.

B = topkrows ( A , K , col ) sorts using only
the columns listed in the numeric vector col , which must contain
positive integers indexing existing columns in A . Columns are used
as sort keys in the order given, and those not listed are not used at
all. The direction is descending unless direction says otherwise.

B = topkrows ( A , K , direction ) sorts in
the given direction , either 'descend' (default) or
'ascend' applying to all columns in A . Alternatively,
direction can be a cell array of character vectors specifying the
sorting direction for each individual column of A .

B = topkrows ( A , K , col , direction )
combines an explicit column list with a per-column direction .

B = topkrows (&hellip;, 'MissingPlacement' , MP )
specifies where the missing elements are placed within each sort column,
with any of the following options specified in MP :

'last' , which is the default, places missing elements last
whichever direction is asked for.
'first' places missing elements first.
'auto' places missing elements last for an ascending sort
and first for a descending one, as sortrows does.

This is an Octave extension: MATLAB has no such option here and always
ranks as 'last' does.

[ B , index ] = topkrows ( A , &hellip;) also returns
an index vector containing the original row indices of A in
B , such that B = A ( index ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Top K sorted rows of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
datetime.transpose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 174
datetime: B = transpose ( A )

Transpose a datetime matrix.

B = transpose ( A ) is the equivalent of the syntax
B = A .' and returns the transpose of the datetime
matrix A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Transpose a datetime matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.tzoffset


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 424
datetime: DT = tzoffset ( T )

Time zone offset of a datetime array.

DT = tzoffset ( T ) returns the offset from UTC of each
element of the input datetime array T as a duration array
DT of the same size as T . The offset is positive for time
zones east of UTC and includes the additional hour when daylight saving
time is in effect. If T has no time zone, or for Not-A-Time
( NaT ) values, the corresponding offset is NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Time zone offset of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
datetime.union


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1210
datetime: C = union ( A , B )
datetime: C = union ( A , B , 'rows' )
datetime: C = union (&hellip;, order )
datetime: [ C , ixA , ixB ] = union (&hellip;)

Set union of two datetime arrays.

C = union ( A , B ) returns the unique datetime
values present in either A or B . Either input may instead be
a date/time character vector, string array, or cell array of character
vectors, which is promoted to a datetime array before the operation.
Membership is decided on the absolute instant, so two zoned inputs may be
in different time zones; the result carries the time zone and display
format of A . Distinct NaT elements are all retained.
C is a row vector when both A and B are row vectors and
a column vector otherwise.

C = union ( A , B , 'rows' ) treats each row
of the datetime matrices A and B , which must have the same
number of columns, as a single element and returns their combined unique
rows.

&hellip; = union (&hellip;, order ) returns the values in
'sorted' order (the default) or in 'stable' order.

[ C , ixA , ixB ] = union (&hellip;) also returns
index vectors ixA and ixB such that C is the
combination of A ( ixA ) and B ( ixB ) ,
or the corresponding row selections when 'rows' is used.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Set union of two datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
datetime.unique


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1877
datetime: B = unique ( A )
datetime: B = unique ( A , setOrder )
datetime: B = unique ( A , occurrence )
datetime: B = unique ( A , setOrder , occurrence )
datetime: B = unique ( A , occurrence , setOrder )
datetime: B = unique ( A , &hellip;, 'rows' )
datetime: [ B , ixA , ixB ] = unique (&hellip;)

Unique values in a datetime array.

B = unique ( A ) returns the unique values of the
datetime array A in sorted order.

B = unique ( A , setOrder ) returns the unique
values of the datetime array A in an order as specified by
setOrder , which can be either of the following values:

'sorted' (default) returns the unique values sorted in
ascending order.
'stable' returns the unique values according to their order
of occurrence.

B = unique ( A , occurrence ) returns the unique
values of the datetime array tblA according to their order of
occurrence. occurrence can be either of the following values:

'first' (default) returns the first occurrence of each
unique value, i.e. the lowest possible indices are returned.
'last' returns the last occurrence of each unique value,
i.e. the highest possible indices are returned.

You can specify setOrder and occurrence arguments together.

B = unique ( A , &hellip;, 'rows' ) returns the
unique rows of A by treating each row as a single entity. The
'rows' option can be used alone or in any combination with the
setOrder and occurrence arguments. 'rows' can be
placed at any position in the function&rsquo;s argument list after the input
array A . However, this syntax is only valid for 2-dimensional
datetime arrays.

[ tblB , ixA , ixB ] = unique (&hellip;) also returns
index vectors ixA and ixB using any of the previous syntaxes.
ixA and ixB map the arrays A and B to one another
such that B = A ( ixA ) and
A = B ( ixB ) . When the 'rows' optional
argument is specified, then B = A ( ixA ,:) and
tblA = tblB ( ixB ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Unique values in a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
datetime.vertcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 371
datetime: C = vertcat ( A , B , &hellip;)

Vertical concatenation of datetime arrays.

C = vertcat ( A , B , &hellip; is the equivalent of
the syntax B = [ A ; B ; &hellip;] and vertically
concatenates the inputs A , B , &hellip;, which must have the
same size except along the first dimension. See cat for which
inputs are accepted and how their time zones are resolved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Vertical concatenation of datetime arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.week


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 816
datetime: W = week ( T )
datetime: W = week ( T , weekType )

Week component of a datetime array.

W = week ( T ) returns the week-of-year number for each
element of the input datetime array T . The output W is a
double array containing integer values in the range
[1, 54] and it has the same size as T . Weeks are counted
from Sunday to Saturday, and the week containing January 1 is week 1.
Not-A-Time ( NaT ) values in T are returned as NaN
in the output array.

W = week ( T , weekType ) returns the week number
for each element of the input datetime array T as specified by
weekType , which may have any of the following options:

'weekofyear' (default) returns the week of the year in a
numeric array, in the range [1, 54] .
'weekofmonth' returns the week of the month in a numeric
array, in the range [1, 6] .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Week component of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
datetime.year


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 285
datetime: Y = year ( T )

Year component of a datetime array.

Y = year ( T ) returns the year number for each element
of the input datetime array T . The output Y is a
double array and it has the same size as T . Not-A-Time
( NaT ) values in T are returned as NaN in the output
array.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Year component of a datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
datetime.ymd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 364
datetime: [ Y , M , D ] = ymd ( T )

Year, Month, and Day components of datetime array.

[ Y , M , D ] = ymd ( T ) returns the year,
month, and day components of the corresponding datetime values in T
as separate numeric arrays. Y , M , D contain integer
values and have the same size as T . Not-A-Time ( NaT )
values in T are returned as NaN in the output arrays.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Year, Month, and Day components of datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
datetime.yyyymmdd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 328
datetime: D = yyyymmdd ( T )

Convert datetime array to YYYYMMDD numeric form.

D = yyyymmdd ( T ) returns a double array
D of the same size as T in which each element encodes the
date of the corresponding datetime as year * 10000 +
month * 100 + day . The time of day is ignored. Not-A-Time
( NaT ) values are returned as NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Convert datetime array to YYYYMMDD numeric form.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
datetime.zoneNameStyle


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1035
datetime: style = datetime.zoneNameStyle ()
datetime: datetime.zoneNameStyle ( style )

Query or set the session-wide style used to render time-zone names.

The z , zz , and zzz fields of a display
Format render a time-zone name. Two styles are available,
selected by this session-wide preference:

'iana' (default)
The IANA time-zone database abbreviation active at each instant, such as
EDT , EEST , JST , or UTC . This is an
Octave-specific extension: a named abbreviation is shown for every zone.
'matlab'
MATLAB-compatible rendering: a named abbreviation is shown only for the
North American zones plus GMT and UTC ; every other zone
renders as a numeric UTC offset such as UTC+3 or
UTC+5:30 .

style = datetime.zoneNameStyle () returns the current
style. datetime.zoneNameStyle ( style ) sets it to
style , either 'iana' or 'matlab' . The setting
persists for the current Octave session.

An individual Format string can override the session style with
the Octave-specific fields zzzz (force 'iana' ) and
zzzzz (force 'matlab' ).


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
Query or set the session-wide style used to render time-zone names.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
days


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 386
datatypes: D = days ( X )

Fixed-time duration in days.

D = days ( X ) returns a duration array representing
fixed-time duration days equivalent to the values in X , which must be a
numeric array.

days is also available as a method for duration arrays, in
which case it performs the opposite conversion.

See also:
duration,
years,
hours,
minutes,
seconds,
milliseconds,
duration.days


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Fixed-time duration in days.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
discretize


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2720
datatypes: bin = discretize ( X , edges )
datatypes: bin = discretize ( X , N )
datatypes: Y = discretize (&hellip;, values )
datatypes: C = discretize (&hellip;, &rsquo;categorical&rsquo;)
datatypes: C = discretize (&hellip;, &rsquo;categorical&rsquo;, names )
datatypes: Y = discretize (&hellip;, &rsquo;IncludedEdge&rsquo;, side )
datatypes: [ bin , edges ] = discretize (&hellip;)

Group data into bins or categories.

bin = discretize ( X , edges ) returns an array of the
same size as X whose elements give the index of the bin that each value
of X falls into. edges must be a real numeric or logical vector
of monotonically non-decreasing values, and defines numel ( edges )
- 1 bins. Bin j covers the half-open interval [ edges (j),
edges (j+1)) , except the last bin, which is closed at both ends.
Values outside [ edges (1), edges (end)] , and any
NaN , return NaN . bin is always of type double .

Repeated edges are permitted and meaningful: they define empty bins, which
are simply never selected. discretize ([1, 2, 3], [1, 2, 2, 3])
returns [1, 3, 3] .

bin = discretize ( X , N ) uses N bins of uniform
width spanning the range of X , where N is a positive integer
scalar. The edges are placed at "nice" decimal positions rather than exactly
at min ( X ) and max ( X ) , so the bins generally
extend slightly beyond the data. NaN and infinite values are ignored
when determining the range. This syntax is not available when X is of
an integer type; supply explicit edges instead.

Y = discretize (&hellip;, values ) returns the corresponding
element of values in place of the bin index, so values must be a
vector whose length equals the number of bins. Y takes the type of
values . Elements of X that fall in no bin return NaN
when values is a floating-point array, zero when it is of an integer
type, and raise an error when it is a cell array.

C = discretize (&hellip;, 'categorical') returns an ordinal
categorical array whose categories are named after the bin intervals,
for example '[1, 3)' . C = discretize (&hellip;,
'categorical', names ) names the categories explicitly; names
must be a cell array of character vectors or a string vector whose
length equals the number of bins.

Y = discretize (&hellip;, 'IncludedEdge', side ) selects
which end of each bin is closed. side may be 'left' (the
default, giving [ edges (j), edges (j+1)) with the last bin
closed at both ends) or 'right' (giving ( edges (j),
edges (j+1)] with the first bin closed at both ends).

[ bin , edges ] = discretize (&hellip;) also returns the bin
edges used. When the edges were supplied they are returned unchanged; when a
bin count was requested they are returned as a row vector.

See also:
histcounts,
categorical


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Group data into bins or categories.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
duration


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 818
datatypes: duration

Array representing durations of time using fixed-length time units.

duration values are stored internally as double type array
representing numbers of elapsed days as a fixed-length time unit. By
default, fractional seconds of duration values are not displayed, but their
actual precision is closer to nanoseconds for typical time lengths.

duration arrays can be created through their constructor by
combining numeric arrays representing individual fixed-length elapsed time
units or through the functions years , days , hours ,
minutes , seconds , and calyears , which create
fixed-length durations in terms of a single duration units. These
functions are also available as methods of duration arrays to
extract individual duration units as numeric arrays.

See also:
calendarDuration,
datetime


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
Array representing durations of time using fixed-length time units.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.Format


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 202
duration: property Format

Display format

Display format, specified as a character vector or string scalar. If
specified as a string scalar, it is converted and stored internally as
a character vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
Display format



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.abs


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 231
duration: B = abs ( A )

Absolute value of the elements of a duration array.

B = abs ( A ) returns the absolute value of each element
in the duration array A . The returned duration array B has
the same size as the input array A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Absolute value of the elements of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.bounds


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 450
duration: [ s , l ] = bounds ( D )
duration: [ s , l ] = bounds ( D , dim )
duration: [ s , l ] = bounds ( D , vecdim )
duration: [ s , l ] = bounds ( D , 'all' )
duration: [ s , l ] = bounds (&hellip;, nanflag )

Return the smallest and largest values of a duration array.

This method is a specialization of the core bounds function for
duration arrays. The functionality is identical to core bounds
function. Type help bounds for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
Return the smallest and largest values of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.cat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 500
duration: C = cat ( dim , A , B , &hellip;)

Concatenate duration arrays.

C = cat ( dim , A , B , &hellip;) concatenates
duration arrays A , B , &hellip; along dimension dim . All
input arrays must have the same size except along the operating dimension
dim . Any of the input arrays may also be string arrays or cell
arrays of character vectors of compatible size. Additionally, an input
can be a numeric matrix, which when parsed to the constructor will return
a duration array of compatible size.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Concatenate duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.ceil


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 491
duration: Y = ceil ( D )
duration: Y = ceil ( D , unit )

Round toward negative infinity for duration arrays.

Y = ceil ( D ) rounds each element of the duration
array D to the smallest integer number of seconds not less than
that element.

Y = ceil ( D , unit ) rounds each element of the
duration array D to the smallest integer number of the specified
unit of time not less than that element. unit must be one of the
following values:

'seconds' (default)
'minutes'
'hours'
'days'
'years'


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Round toward negative infinity for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.cellstr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 257
duration: cstr = cellstr ( D )
duration: cstr = cellstr ( D , Format )

Convert duration array to a cell array of character vectors.

cstr = cellstr ( D ) returns a cellstr array of
character vectors, cstr , which has the same size as the input
duration D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
Convert duration array to a cell array of character vectors.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.center


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 372
duration: C = center ( D )
duration: C = center ( D , dim )
duration: C = center ( D , vecdim )
duration: C = center ( D , 'all' )
duration: C = center (&hellip;, nanflag )

Center values in a duration array.

This method overloads the core center function for duration
arrays. The functionality is identical to core center function.
Type help center for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Center values in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.char


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 339
duration: cmat = char ( D )

Convert duration array to a character matrix.

cmat = char ( D ) returns a character matrix with one
row per element in D , taken in column-major order.

Rows shorter than the widest are padded on the left , so the
character matrix is right-justified, as MATLAB returns it and as the
array itself is displayed.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Convert duration array to a character matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
duration.circshift


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 743
duration: B = circshift ( A , n )
duration: B = circshift ( A , n , dim )

Circularly shift the elements in a duration array.

B = circshift ( A , n ) circularly shifts the
elements of the duration array A according to n . If n
is a nonzero integer scalar, then the elements of A are shifted by
n elements along the first non-singleton dimension of A . If
n is a vector, it must not be longer that the number of dimensions
of A with each value of n corresponding to a dimension in
A . The sign of the value(s) in n specify the direction in
the elements of A are shifted.

B = circshift ( A , n , dim ) circularly
shifts the elements of the duration array A along the dimension
specified by dim . In this case, n must be a scalar integer
value.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Circularly shift the elements in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.colon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 770
duration: R = colon ( Base , Limit )
duration: R = colon ( Base , Increment , Limit )

Create a range of durations in a vector.

R = colon ( Base , Limit ) is the equivalent of the
syntax C = Base : Limit and returns a duration
vector in the range from Base to Limit incremented by 24-hour
days.

R = colon ( Base , Increment , Limit ) is
equivalent to C = Base : Increment : Limit .
dimension sizes must be equal or one of them must be 1. The size of
C is determined by the size compatibility of A and B .

As long as one of the inputs is a duration scalar, the following types
are additionally supported for the remaining input arguments:

numeric scalar (24-hour day)
character vector (duration string)
cellstr scalar (duration string)
string scalar (duration string)


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Create a range of durations in a vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
duration.ctranspose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 235
duration: B = ctranspose ( A )

Transpose a duration matrix.

B = ctranspose ( A ) is the equivalent of the syntax
B = A ' and returns the transpose of the duration
matrix A . For duration arrays, ctranspose is identical to
transpose .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Transpose a duration matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.cummax


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 598
duration: M = cummax ( D )
duration: M = cummax ( D , dim )
duration: M = cummax ( D , vecdim )
duration: M = cummax ( D , 'all' )
duration: M = cummax ( [] , nanflag )
duration: M = cummax ( [] , direction )
duration: [ M , index ] = cummax (&hellip;)
duration: [ M , index ] = cummax (&hellip;, 'linear' )
duration: &hellip; = cummax (&hellip;, 'ComparisonMethod' , method )

Return the cumulative maximum values in duration arrays.

This method overloads the core cummax function for duration
arrays. The functionality is identical to core cummax function.
Type help cummax for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Return the cumulative maximum values in duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.cummin


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 598
duration: M = cummin ( D )
duration: M = cummin ( D , dim )
duration: M = cummin ( D , vecdim )
duration: M = cummin ( D , 'all' )
duration: M = cummin ( [] , nanflag )
duration: M = cummin ( [] , direction )
duration: [ M , index ] = cummin (&hellip;)
duration: [ M , index ] = cummin (&hellip;, 'linear' )
duration: &hellip; = cummin (&hellip;, 'ComparisonMethod' , method )

Return the cumulative minimum values in duration arrays.

This method overloads the core cummin function for duration
arrays. The functionality is identical to core cummin function.
Type help cummin for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Return the cumulative minimum values in duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.cumsum


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 451
duration: CS = cumsum ( D )
duration: CS = cumsum ( D , dim )
duration: CS = cumsum ( D , vecdim )
duration: CS = cumsum ( D , 'all' )
duration: CS = cumsum (&hellip;, direction )
duration: CS = cumsum (&hellip;, nanflag )

Compute the cumulative sum of the elements of a duration array.

This method overloads the core cumsum function for duration
arrays. The functionality is identical to core cumsum function.
Type help cumsum for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
Compute the cumulative sum of the elements of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.datenum


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 519
duration: N = datenum ( D )

Convert a duration array to numbers of days.

N = datenum ( D ) returns a double array of the
same size as D holding the length of each duration in days,
including any fractional part. NaN durations give NaN .

A duration measures elapsed time rather than naming a point in it, so the
result is a count of days and not a serial date number: adding it to a
serial date number shifts that date by the duration. This is the same
value days returns, under the name the older date functions use.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Convert a duration array to numbers of days.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.datevec


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 890
duration: DV = datevec ( DT )
duration: [ Y , MO , D , h , mi , s ] = datevec ( DT )

Convert duration array to date vectors.

DV = datevec ( DT ) returns an N&times;6 numeric matrix
whose rows represent each element in DT and each column corresponds
to years, months, days, hours, minutes, and seconds, respectively. Since
months cannot be represented as a fixed length of time, the second column
of DV is always zero. DV represents a length of time split
across different fixed-length elapsed time units. The number of rows in
DV equals to the number of elements in the duration array DT .

[ Y , MO , D , h , mi , s ] = datevec
( DT ) returns the components of DT as individual variables,
but unlike DV in the previous syntax, each variable has the same
size as the duration array DT .

Values containing a fractional portion less than 1 picosecond are rounded
to the nearest picosecond.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Convert duration array to date vectors.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.days


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 237
duration: X = days ( D )

Duration equivalent numeric values in fixed-length days.

X = days ( D ) converts durations in D to the
equivalent number of fixed-length days (1 day equals 24 hours). X
is a double array of the same size as D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Duration equivalent numeric values in fixed-length days.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.diff


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 317
duration: DT = diff ( D )
duration: DT = diff ( D , K )
duration: DT = diff ( D , K , DIM )

Compute differences between adjacent elements in a duration array.

This method overloads the core diff function for duration arrays.
The functionality is identical to core diff function. Type
help diff for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
Compute differences between adjacent elements in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
duration.discretize


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1994
duration: bin = discretize ( D , edges )
duration: bin = discretize ( D , N )
duration: bin = discretize ( D , dur )
duration: bin = discretize ( D , unit )
duration: Y = discretize (&hellip;, values )
duration: C = discretize (&hellip;, &rsquo;categorical&rsquo;)
duration: C = discretize (&hellip;, &rsquo;categorical&rsquo;, names )
duration: Y = discretize (&hellip;, &rsquo;IncludedEdge&rsquo;, side )
duration: [ bin , edges ] = discretize (&hellip;)

Group durations into bins.

bin = discretize ( D , edges ) returns the index of
the bin each element of D falls into, given a duration
vector of bin edges. Bin j covers [ edges (j),
edges (j+1)) , except the last, which is closed at both ends.
Elements outside the edges, and NaN durations, return
NaN .

bin = discretize ( D , N ) uses N bins of
uniform width, placed on whole time units where that is possible.

bin = discretize ( D , dur ) uses bins of the fixed
width dur , a scalar duration ,
and bin = discretize ( D , unit ) uses bins one
unit wide, where unit is one of 'second' ,
'minute' , 'hour' , 'day' , 'week' ,
'month' , 'quarter' , 'year' , 'decade' or
'century' . A month is a twelfth of the 365.2425-day year that
years counts, since a duration has no calendar.

The remaining options are as for the top-level discretize .

Deviation from MATLAB, for an explicitly requested bin count
only. Every other way of binning &ndash; automatic, by width, by unit, or by
explicit edges &ndash; agrees with MATLAB exactly. Asked for a bin count,
MATLAB chooses between whole-unit and decimal widths in a way that is not
monotonic in the data: over seconds ([0 16.8]) it gives 7 bins of
2.5 s, over the wider seconds ([0 17.15]) 7 bins of 3 s, and
decimal widths again above that. It also discards bins, giving
hours (0:24) in 7 bins a 4-hour width that covers the data in 6.
A whole time unit is used here whenever it still needs every bin
requested, which is monotonic and never wastes a bin.

See also:
histcounts ,
discretize


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Group durations into bins.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
duration.dispstrings


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 232
duration: cstr = dispstrings ( D )

Get display formatted strings for each element of a duration array.

cstr = dispstrings ( D ) returns a cellstr array of
character vectors, cstr , which has the same size as the input
duration D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
Get display formatted strings for each element of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.duration


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2099
duration: D = duration ( X )
duration: D = duration ( H , MI , S )
duration: D = duration ( H , MI , S , MS )
duration: D = duration ( TimeStrings )
duration: D = duration ( TimeStrings , 'InputFormat' , INFMT )
duration: D = duration (&hellip;, 'Format' , FMT )

Create a new array of fixed-length time durations.

D = duration ( X ) creates a column vector of durations
from a numeric matrix.

D = duration ( H , MI , S ) creates a duration
array from numeric arrays containing the number of hours, minutes, and
seconds specified by H , MI and S , respectively.

D = duration ( H , MI , S , MS ) creates
a duration array from numeric arrays containing the number of hours,
minutes, seconds, and milliseconds specified by H , MI ,
S , and MS , respectively.

D = duration ( TimeStrings ) creates a duration array
from text that represents elapsed times. TimeStrings can be a
character vector, a cell array of character vectors, or a string array
representing times using either the 'hh:mm:ss' or the
'dd:hh:mm:ss' format.

D = duration ( TimeStrings , 'InputFormat' ,
INFMT ) creates a duration array from text that represents elapsed
times according to the format specified by INFMT , which can be any
of the following:

'dd:hh:mm:ss'
'hh:mm:ss'
'mm:ss'
'hh:mm'
Any of the first three formats can also be appended with up to nine
S characters to indicate fractional second digits, such as
'dd:hh:mm:ss.SS' or 'mm:ss.SS' .

D = duration (&hellip;, 'Format' , FMT )
specifies the format in which D is displayed. FMT can
specify either a digital timer, which can have any of the valid formats
for 'InputFormat' as shown above or a single number with time
units by specifying one of the following:

'y' fixed-length years (1 year equals 365.2425 days)
'd' fixed-length days (1 day equals 24 hours)
'h' hours
'm' minutes
's' seconds

D = duration () returns a scalar array of durations with an
elapsed time value of zero. To create an empty duration array, use
duration ([], [], []) .

See also:
years ,
days ,
hours ,
minutes ,
seconds ,
milliseconds ,
duration,
isduration,
calendarDuration,
datetime


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Create a new array of fixed-length time durations.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.empty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 620
duration: E = duration.empty ()
duration: E = duration.empty ( sz )
duration: E = duration.empty ( m , n , &hellip;)

Create an empty duration array.

E = duration.empty () returns a 0&times;0 empty duration
array. duration.empty ( m , n , &hellip;) or
duration.empty ( sz ) returns an empty duration array of the
requested size, which must have at least one dimension equal to zero. A
lone dimension gives a square size, so duration.empty (3) is an
error while duration.empty (0) is 0&times;0 . As for
zeros , a negative dimension counts as zero, and a size vector with
nothing in it names no size and gives 0&times;0 .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Create an empty duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.eps


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 514
duration: E = eps ( D )

Spacing of duration values.

E = eps ( D ) returns the distance from each element of
D to the next duration that can be told apart from it, as a
duration array of the same size. It is the resolution available
at that magnitude: two durations closer together than this are the same
value. eps of a negative duration is that of its magnitude, and
eps of NaN is NaN .

The spacing is that of the milliseconds a duration is stored in,
which is what MATLAB stores too, so the two agree exactly.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Spacing of duration values.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
duration.eq


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 692
duration: TF = eq ( A , B )

Equality for duration arrays.

TF = eq ( A , B ) is the equivalent of the syntax
TF = A == B and returns a logical array whose
elements set to true where the corresponding elements of A
and B are equal and set to false otherwise.

A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1. The size of
C is determined by the size compatibility of A and B .

One of the input arguments can also be a character vector, a cell array
of character vectors, or a string array representing duration strings or
a numeric array representing days.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Equality for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.floor


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 499
duration: Y = floor ( D )
duration: Y = floor ( D , unit )

Round toward negative infinity for duration arrays.

Y = floor ( D ) rounds each element of the duration
array D to the largest integer number of seconds not greater than
that element.

Y = floor ( D , unit ) rounds each element of the
duration array D to the largest integer number of the specified
unit of time not greater than that element. unit must be one of
the following values:

'seconds' (default)
'minutes'
'hours'
'days'
'years'


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Round toward negative infinity for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
duration.ge


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 707
duration: TF = ge ( A , B )

Equality for duration arrays.

TF = ge ( A , B ) is the equivalent of the syntax
TF = A >= B and returns a logical array whose
elements set to true where the corresponding elements of A
are greater than or equal to B and set to false otherwise.

A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1. The size of
C is determined by the size compatibility of A and B .

One of the input arguments can also be a character vector, a cell array
of character vectors, or a string array representing duration strings or
a numeric array representing days.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Equality for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
duration.gt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 694
duration: TF = gt ( A , B )

Equality for duration arrays.

TF = gt ( A , B ) is the equivalent of the syntax
TF = A > B and returns a logical array whose
elements set to true where the corresponding elements of A
are greater than B and set to false otherwise.

A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1. The size of
C is determined by the size compatibility of A and B .

One of the input arguments can also be a character vector, a cell array
of character vectors, or a string array representing duration strings or
a numeric array representing days.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Equality for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.histc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 322
duration: n = histc ( D , edges )
duration: n = histc ( D , edges , dim )
duration: [ n , idx ] = histc (&hellip;)

Compute histogram counts in a duration array.

This method overloads the core histc function for duration
arrays. The functionality is identical to core histc function.
Type help histc for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Compute histogram counts in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
duration.histcounts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1045
duration: N = histcounts ( D )
duration: N = histcounts ( D , nbins )
duration: N = histcounts ( D , edges )
duration: N = histcounts (&hellip;, Name , Value )
duration: [ N , edges ] = histcounts (&hellip;)
duration: [ N , edges , bin ] = histcounts (&hellip;)

Histogram bin counts for durations.

N = histcounts ( D ) bins the durations in D ,
chosen automatically, and returns the number of elements in each bin.
D is treated as D (:) and NaN durations are
excluded.

N = histcounts ( D , nbins ) and
N = histcounts ( D , edges ) bin by count and by
explicit duration edges respectively.

'BinWidth' takes a scalar duration ,
'BinLimits' a two-element
duration , and 'BinEdges' a duration vector.
'BinMethod' accepts 'auto' , 'scott' ,
'fd' , 'sturges' and 'sqrt' , but not
'integers' , which has no meaning for a duration.

'Normalization' accepts 'count' , 'cumcount' ,
'probability' , 'percentage' and 'cdf' .
'countdensity' and 'pdf' are not accepted, since a
density per unit time has no meaning here.

See also:
discretize ,
histcounts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Histogram bin counts for durations.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.hms


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 789
duration: H = hms ( D )
duration: [ H , M ] = hms ( D )
duration: [ H , M , S ] = hms ( D )

Split duration array into separate time unit values.

[ H , M , S ] = hms ( D ) splits the duration
array D into separate numeric arrays H , M , and S ,
which correspond to hours, minutes, and seconds, respectively. Hours and
minutes are returned as whole numbers, while seconds may also have a
fractional part.

Each component is what truncating division leaves, so every one of them
carries the sign of the duration as a whole and a span a hair under an
hour reports 59 minutes rather than a whole one. Nothing is snapped to a
whole unit and nothing is rounded to a fixed precision.

A duration that is not finite has no components to divide between: all
three take that same infinity, or NaN .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Split duration array into separate time unit values.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.horzcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 559
duration: C = horzcat ( A , B , &hellip;)

Horizontal concatenation of duration arrays.

C = horzcat ( A , B , &hellip; is the equivalent of
the syntax B = [ A , B , &hellip;] and horizontally
concatenates the duration arrays A , B , &hellip;. All input
arrays must have the same size except along the second dimension. Any of
the input arrays may also be string arrays or cell arrays of character
vectors of compatible size. Additionally, an input can be a numeric
matrix, which when parsed to the constructor will return a duration array
of compatible size.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Horizontal concatenation of duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.hours


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 191
duration: X = hours ( D )

Duration equivalent numeric values in hours.

X = hours ( D ) converts durations in D to the
equivalent number of hours. X is a double array of the same size
as D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Duration equivalent numeric values in hours.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.interp1


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2693
duration: YI = interp1 ( X , Y , XI )
duration: YI = interp1 ( Y , XI )
duration: YI = interp1 (&hellip;, method )
duration: YI = interp1 (&hellip;, method , extrapolation )
duration: pp = interp1 ( X , Y , 'pp' )
duration: pp = interp1 ( X , Y , method , 'pp' )

One-dimensional interpolation for duration arrays.

YI = interp1 ( X , Y , XI ) computes the
linearly interpolated values of a one-dimensional function, which is
represented by sample points X and corresponding values Y ,
at specific query points XI . X must be a vector. If Y
is vector, then it must have the same length as X . If Y is
matrix, then each column is treated as a different set of one-dimensional
sample values and the number of rows must equal the length of X .
XI must be a vector and the same data type as X . The output
XI is the same data type as Y and its size depends on Y
and XI . X and Y can both be duration arrays or one of
them can be a numeric array.

YI = interp1 ( Y , XI ) computes the linearly
interpolated values of a one-dimensional function assuming a default set
of sampling points determined by the shape of Y :

If Y is a vector, then the default sampling points are
[1:length( Y ) .
If Y is an array, then the default sampling points are
[1:size( Y ) .

YI = interp1 (&hellip;, method ) specifies one of the
following interpolation methods to be used:

'linear' (default) computes the linear interpolation from
nearest neighbors.
'nearest' returns the nearest neighbor.
'next' returns the next neighbor.
'previous' returns the previous neighbor.
'pchip' computes the piecewise cubic Hermite interpolating
polynomial, which corresponds to shape-preserving interpolation with
smooth first derivative.
'cubic' computes the cubic interpolation.
'spline' computes the cubic spline interpolation, which
corresponds to smooth first and second derivatives throughout the curve.

YI = interp1 (&hellip;, method , extrapolation )
further specifies a strategy for evaluating points that lie outside the
range of the sample points in X . Set extrapolation to
'extrap' to use the current method to extrapolate values.
Set extrapolation to a scalar value of the same data type as
Y to return a constant value outside the range of X . When
unspecified, extrapolation defaults to NaN .

pp = interp1 ( X , Y , 'pp' returns a
piecewise polynomial object, using the default linear interpolation
algorithm, which can be later used with ppval to evaluate the
interpolation at new query points.

pp = interp1 ( X , Y , method , 'pp'
return a piecewise polynomial object, using the interpolation algorithm
specified by method , which can be later used with ppval to
evaluate the interpolation at new query points.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
One-dimensional interpolation for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
duration.intersect


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1379
duration: C = intersect ( A , B )
duration: C = intersect ( A , B , 'rows' )
duration: C = intersect ( A , B , &hellip;, order )
duration: [ C , ixA , ixB ] = intersect (&hellip;)

Set intersection of two duration arrays.

C = intersect ( A , B ) returns the unique common
values of the duration arrays A and B . Either A or
B input arguments can also be a duration string specified as a
character vector, a string array, or a cell array of character vectors,
or a numeric array representing 24-hour days. In such case, the input is
promoted to a duration array prior to calculating the intersection. If
both A and B are row vectors, then C is also a row
vector, otherwise intersect returns a column vector.

C = intersect ( A , B , 'rows' returns the
unique common rows of the duration matrices A and B , which
must have the same number of columns. By default, the rows in duration
matrix C are in sorted order.

&hellip; = intersect ( A , B , &hellip;, order ) also
specifies the order of the returned unique values. order can be
'sorted' , which is the default behavior, or 'stable' , in
which case the unique values are returned in order of appearance.

[ C , ixA , ixB ] = intersect (&hellip;) also returns
index vectors ixA and ixB such that
C = A ( ixA ) and
C = B ( ixB ) , unless the 'rows' optional
argument is given, in which case C = A ( ixA ,:)
and C = B ( ixB ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Set intersection of two duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.ipermute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 483
duration: A = ipermute ( B , dims )

Inverse of the generalized transpose for a duration N-D array.

A = ipermute ( B , dims ) returns the inverse of
the generalized transpose performed by the permute function. The
expression ipermute (permute ( A , dims ), dims )
returns the original array A .

dims must index all the dimensions 1:ndims ( B ) of the
input array B , in any order, but only once. The dimension of
B specified in dims ( N ) gets remapped to the
N th dimension of A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Inverse of the generalized transpose for a duration N-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.iqr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 364
duration: r = iqr ( D )
duration: r = iqr ( D , dim )
duration: r = iqr ( D , vecdim )
duration: r = iqr ( D , 'all' )
duration: [ r , q ] = iqr (&hellip;)

Compute the interquartile range of a duration array.

This method overloads the core iqr function for duration arrays.
The functionality is identical to core iqr function.
Type help iqr for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Compute the interquartile range of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
duration.isbetween


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1174
duration: TF = isbetween ( D , lower , upper )
duration: TF = isbetween ( D , lower , upper , intervalType )

Find duration elements within specified range.

TF = isbetween ( D , lower , upper ) returns a
logical array, TF , which is the same size as the input duration
array D and it contains true for each corresponding element
which is within the range specified by lower and upper and
false otherwise. lower and upper must be duration
arrays of compatible size with D or alternatively they can be
specified as a character vector, a cell array of character vectors or a
string array containing valid text duration representations.

TF = isbetween ( D , lower , upper ,
intervalType ) specifies the type of interval for the lower
and upper bounds and it can be one of the following values.

'closed' (default) includes lower and upper bounds.
'open' excludes lower and upper bounds.
'openleft' or 'closedright' exclude the lower and
include the upper bound. They have identical behavior.
'closedleft' or 'openright' include the lower and
exclude the upper bound. They have identical behavior.

intervalType can be specified either as a character vector or a
string scalar.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Find duration elements within specified range.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.iscolumn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 349
duration: TF = iscolumn ( D )

Return true if duration array is a column vector.

TF = iscolumn ( D ) returns a logical scalar TF ,
which is true if the duration array D is a column vector
and false otherwise. A column vector is a 2-D array for which
size ( D ) returns [ N , 1] with non-negative
N . By definition, a scalar is also a column vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Return true if duration array is a column vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.isempty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 187
duration: TF = isempty ( D )

Return true if duration array is empty.

TF = isempty ( D ) returns a logical scalar TF ,
which is true if the duration array D is empty and
false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Return true if duration array is empty.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.isequal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 571
duration: TF = isequal ( D1 , D2 )
duration: TF = isequal ( D1 , D2 , &hellip;)

Return true if duration arrays are equal.

TF = isequal ( D1 , D2 ) returns a logical scalar
TF , which is true , if the duration arrays D1 and
D2 contain the same values, and false otherwise. Either
D1 or D2 can also be specified as a character vector, a cell
array of character vectors or a string array containing valid text
duration representations.

TF = isequal ( D1 , D2 , &hellip;) returns a logical
scalar TF , which is true , if all input arguments are equal,
and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Return true if duration arrays are equal.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.isequaln


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 715
duration: TF = isequaln ( D1 , D2 )
duration: TF = isequaln ( D1 , D2 , &hellip;)

Return true if duration arrays are equal under the assumption that
missing elements are equal.

TF = isequaln ( D1 , D2 ) returns a logical scalar
TF , which is true , if the duration arrays D1 and
D2 contain the same values or corresponding missing elements, and
false otherwise. Either D1 or D2 can also be
specified as a character vector, a cell array of character vectors or a
string array containing valid text duration representations.

TF = isequaln ( D1 , D2 , &hellip;) returns a
logical scalar TF , which is true , if all input arguments
are equal under the assumption that missing elements are equal, and
false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 94
Return true if duration arrays are equal under the assumption that missing elements are equal.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.isfinite


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 313
duration: TF = isfinite ( D )

Return true for duration elements that are finite.

TF = isfinite ( D ) returns a logical array TF
of the same size as calD containing true for each
corresponding element of D that is finite and false
otherwise. Finite elements are those which are neither infinite nor
Not-A-Number.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Return true for duration elements that are finite.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.isinf


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 250
duration: TF = isinf ( D )

Return true for duration elements that are infinite.

TF = isinf ( D ) returns a logical array TF
of the same size as D containing true for each
corresponding element of calD that is either Inf or
-Inf and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Return true for duration elements that are infinite.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.ismatrix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 298
duration: TF = ismatrix ( D )

Return true if duration array is a 2-D array.

TF = ismatrix ( D ) returns a logical scalar TF ,
which is true if the duration array D is a matrix and
false otherwise. A matrix is an array of any type where
ndims ( D ) == 2 . By definition, a scalar is also a matrix.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Return true if duration array is a 2-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.ismember


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1255
duration: TF = ismember ( A , B )
duration: TF = ismember ( A , B , 'rows' )
duration: [ TF , index ] = ismember (&hellip;)
duration: [ TF , index ] = ismember (&hellip;, 'legacy' )

Find duration elements in a set.

TF = ismember ( A , B ) returns a logical array
TF of the same size as A containing true for each
corresponding element of A that is in B and false
otherwise. NaN elements are not equal with each other and always
return false .

TF = ismember ( A , B , 'rows' ) only
applies to duration matrices with the same number of columns, in which
case the logical vector TF contains true for each row of
A that is also a row in B . TF has the same number of
rows as A .

[ TF , index ] = ismember ( A , B ) also returns
an index array of the same size as A containing the lowest index in
B for each element of A that is a member of B and 0
otherwise. If the 'rows' optional argument is used, then the
returning index is a column vector with the same rows as A and it
contains the lowest index in B for each row of A that is a
member of B and 0 otherwise. If the 'legacy' optional
argument is specified, then the highest index of matched elements is
returned. Unless multiple matches exist, the 'legacy' option has
no effect on the returned index .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Find duration elements in a set.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
duration.ismissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 530
duration: TF = ismissing ( D )
duration: TF = ismissing ( D , indicator )

Find missing elements in duration array.

TF = ismissing ( D ) returns a logical array, TF ,
with the same dimensions as D , where true values match the
standard missing values in the input duration array.

The optional input indicator can be a scalar or a vector duration
array, specifying alternative missing values in the input data. When
specifying indicator values, the standard missing values are
ignored, unless explicitly stated in the indicator .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Find missing elements in duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.isnan


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 239
duration: TF = isnan ( D )

Return true for duration elements that are Not-A-Number.

TF = isnan ( D ) returns a logical array TF of
the same size as D containing true for each corresponding
element of calD that is NaN and false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Return true for duration elements that are Not-A-Number.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
duration.isregular


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1718
duration: TF = isregular ( D )
duration: TF = isregular ( D , COMPONENT )
duration: [ TF , DT ] = isregular (&hellip;)

Return true if a duration vector is regularly spaced.

TF = isregular ( D ) returns true when the elements of
the duration vector D are evenly spaced, that is, when every step
from one element to the next is the same and is not zero. A second
output DT gives that step, and is NaN when there is none.

A sequence that does not move is not regularly spaced: a step of zero
describes no spacing, so isregular of a constant vector is false.
A descending vector is regular, with a negative step. A NaN or an
infinite element anywhere makes the vector irregular, as does having
fewer than two elements, so a scalar and an empty array are both false.
D must be a vector; a matrix is an error.

TF = isregular ( D , COMPONENT ) asks about a
particular component, one of 'Years' , 'Quarters' ,
'Months' , 'Weeks' , 'Days' or 'Time' . A
duration measures elapsed time and knows nothing of a calendar, so only
'Time' , the default, can be true; every calendar component is
false however the vector is spaced. The argument exists so that a
duration can be asked the same question as a datetime .

Steps are compared within a few eps of the largest value present
rather than exactly, because subtracting neighbouring durations rounds:
even one, two and three hours have steps differing in the last bit, and
an exact test would call that irregular. MATLAB tolerates a difference
of about the same size, for the same reason.

Deviation from MATLAB. A negative step is returned there
formatted in seconds whatever the vector&rsquo;s own format; here the step
keeps D &rsquo;s format whichever way the vector runs.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Return true if a duration vector is regularly spaced.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.isrow


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 330
duration: TF = isrow ( D )

Return true if duration array is a row vector.

TF = isrow ( D ) returns a logical scalar TF ,
which is true if the duration array D is a row vector
and false otherwise. A row vector is a 2-D array for which
size ( D ) returns [1, N ] with non-negative
N . By definition, a scalar is also a row vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Return true if duration array is a row vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.isscalar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 274
duration: TF = isscalar ( D )

Return true if duration array is a scalar.

TF = isscalar ( D ) returns a logical scalar TF ,
which is true if the duration array D is also a scalar
and false otherwise. A scalar is a single element object for
which size ( D ) returns [1, 1] .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Return true if duration array is a scalar.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.issorted


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2028
duration: TF = issorted ( D )
duration: TF = issorted ( D , dim )
duration: TF = issorted ( D , direction )
duration: TF = issorted ( D , dim , direction )
duration: TF = issorted (&hellip;, 'MissingPlacement' , MP )
duration: TF = issorted (&hellip;, 'ComparisonMethod' , CM )

Return true if duration array is sorted.

TF = issorted ( D ) returns a logical scalar TF ,
which is true , if the duration array D is sorted in
ascending order, and false otherwise.

TF = issorted ( D , dim ) returns a logical scalar
TF , which is true , if the duration array D is
sorted in ascending order along the dimension dim , and
false otherwise.

TF = issorted ( D , direction ) returns a logical
scalar TF , which is true , if the duration array D
is sorted in the direction specified by direction , and
false otherwise. direction can be any of the following
options:

'ascend' , which is the default, checks is elements are in
ascending order.
'descend' checks if elements are in descending order.
'monotonic' checks if elements are either in ascending or
descending order.
'strictascend' checks if elements are in ascending order
and there are no duplicate or undefined elements.
'strictdescend' checks if elements are in descending order
and there are no duplicate or undefined elements.
'strictmonotonic' checks if elements are either in
ascending or descending order and there are no duplicate or undefined
elements.

TF = issorted (&hellip;, 'MissingPlacement' ,
MP )
specifies where missing elements ( NaN ) are placed with one of the
following options specified in MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.

TF = issorted (&hellip;, 'ComparisonMethod' ,
CM )
specifies the comparison method for determining the order of elements
with one of following options specified in CM :

'auto' , which is the default, sorts by real (A) .
'real' sorts by real (A) .
'abs' sorts by abs (A) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Return true if duration array is sorted.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
duration.issortedrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2884
duration: TF = issortedrows ( D )
duration: TF = issortedrows ( D , col )
duration: TF = issortedrows ( D , direction )
duration: TF = issortedrows ( D , col , direction )
duration: TF = issortedrows (&hellip;, 'MissingPlacement' , MP )
duration: TF = issortedrows (&hellip;, 'ComparisonMethod' , CM )

Return true if duration matrix rows are sorted.

TF = issortedrows ( D ) returns a logical scalar
TF , which is true , if the rows in the 2-D duration array
D are sorted in ascending order, and false otherwise.

TF = issortedrows ( D , col ) returns a logical
scalar TF , which is true , if the duration array D
is sorted according to the columns specified by the vector col , and
false otherwise. col must explicitly contain non-zero
integers whose absolute values index existing columns in D .
Positive elements sort the corresponding columns in ascending order,
while negative elements sort the corresponding columns in descending
order.

TF = issortedrows ( D , direction ) checks if the
rows in D are sorted according to the specified direction, which
can be one of the following options:

'ascend' , which is the default, checks is elements are in
ascending order.
'descend' checks if elements are in descending order.
'monotonic' checks if elements are either in ascending or
descending order.
'strictascend' checks if elements are in ascending order
and there are no duplicate or undefined elements.
'strictdescend' checks if elements are in descending order
and there are no duplicate or undefined elements.
'strictmonotonic' checks if elements are either in
ascending or descending order and there are no duplicate or undefined
elements.

Alternatively, direction can be a cell array of character
vectors specifying the sorting direction for each individual column of
D , in which case the number of elements in direction must
equal the number of columns in D .

TF = issortedrows ( D , col , direction )
checks if the rows in the duration array D are sorted according
to the columns specified in col using the corresponding sorting
direction specified in direction . In this case, the sign of the
values in col is ignored. col and direction must have
the same length, but not necessarily the same number of elements as the
columns in D .

TF = issortedrows (&hellip;, 'MissingPlacement' ,
MP ) specifies where missing elements ( <undefined> ) are
placed with one of the following options specified in MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.

TF = issortedrows (&hellip;, 'ComparisonMethod' ,
CM ) specifies the comparison method for determining the order of
elements with one of following options specified in CM :

'auto' , which is the default, sorts by real (A) .
'real' sorts by real (A) .
'abs' sorts by abs (A) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Return true if duration matrix rows are sorted.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.isvector


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 341
duration: TF = isvector ( D )

Return true if duration array is a vector.

TF = isvector ( D ) returns a logical scalar TF ,
which is true if the duration array D is a vector and
false otherwise. A vector is a 2-D array for which one of the
dimensions is equal to 1 (either 1&times;N or N&times;1 ). By
definition, a scalar is also a vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Return true if duration array is a vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.keyHash


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1119
duration: key = keyHash ( D )
duration: key = keyHash ( D , base )

Generate a hash code for duration array.

key = keyHash ( D ) generates a uint64 scalar
that represents the input array D . keyHash utilizes the
64-bit FNV-1a variant of the Fowler-Noll-Vo non-cryptographic hash
function.

key = keyHash ( D , base ) also generates a 64-bit
hash code using base as the offset basis for the FNV-1a hash
algorithm. base must be a uint64 integer type scalar. Use
this syntax to cascade keyHash on multiple objects for which a
single hash code is required.

A duration array is keyed on its length in milliseconds, so the unit it
was written in is not part of the key and seconds (1) hashes as
milliseconds (1000) . A missing duration is keyed alike whatever
produced its NaN . The Format property is display only
and is not part of the key. Two arrays that keyMatch reports as
the same key always hash alike.

Note that unlike MATLAB, this implementation does not use any random
seed. As a result, keyHash will always generate the exact same
hash key for any particular input across different workers and Octave
sessions.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Generate a hash code for duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.kurtosis


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 551
duration: k = kurtosis ( D )
duration: k = kurtosis ( D , flag )
duration: k = kurtosis ( D , flag , dim )
duration: k = kurtosis ( D , flag , vecdim )
duration: k = kurtosis ( D , flag , 'all' )

Compute the sample kurtosis of a duration array.

This method overloads the core kurtosis function for duration
arrays. The functionality is identical to core kurtosis function.
Type help kurtosis for more information.

Note that kurtosis is a dimensionless quantity Thus, the returned
argument is a numeric array of double type and not a duration array.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Compute the sample kurtosis of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.ldivide


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 674
duration: C = ldivide ( A , B )

Element-wise left division for duration arrays.

C = ldivide ( A , B ) is the equivalent of the
syntax C = A .\ B and returns the element-wise
division of the duration array B by the corresponding elements of
input array A , which can either be a duration or a numeric array.
If A is a duration array, then C is a double numeric array.
If A is a numeric array, then C is a duration array.

A and B must be size compatible, which translates to they
can be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1. The size of
C is determined by the size compatibility of A and B .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Element-wise left division for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
duration.le


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 704
duration: TF = le ( A , B )

Equality for duration arrays.

TF = le ( A , B ) is the equivalent of the syntax
TF = A <= B and returns a logical array whose
elements set to true where the corresponding elements of A
are less than or equal to B and set to false otherwise.

A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1. The size of
C is determined by the size compatibility of A and B .

One of the input arguments can also be a character vector, a cell array
of character vectors, or a string array representing duration strings or
a numeric array representing days.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Equality for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.length


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 226
duration: N = length ( D )

Length of a duration vector.

N = length ( D ) returns the size of the longest
dimension of the duration array D , unless any of its dimensions has
zero length, in which case length ( D ) returns 0.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Length of a duration vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.linspace


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1008
duration: R = linspace ( Start , End )
duration: R = linspace ( Start , End , N )

Create linearly spaced duration elements.

R = linspace ( Start , End ) returns 100 linearly
spaced elements between Start and End . If Start and
End are scalars, then R is a vector. If one or both inputs
are vectors, then R is a matrix where each row is an independent
sequence between Start (idx_N) and End (idx_N) .

R = linspace ( Start , End , N ) specifies the
number (default is 100) of equally spaced elements between Start
and End . If N is not an integer value, then it is floored
to the nearest integer. If N is zero or negative, then an empty
matrix is returned. If N is one, then End is returned.
If N greater than one, then Start and End are always
included in the range.

Either Start or End input arguments can also be one of the
following types:

numeric scalar or vector (24-hour days)
character vector (duration string)
cellstr scalar or vector (duration strings)
string scalar or vector (duration strings)


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Create linearly spaced duration elements.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
duration.lt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 691
duration: TF = lt ( A , B )

Equality for duration arrays.

TF = lt ( A , B ) is the equivalent of the syntax
TF = A < B and returns a logical array whose
elements set to true where the corresponding elements of A
are less than B and set to false otherwise.

A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1. The size of
C is determined by the size compatibility of A and B .

One of the input arguments can also be a character vector, a cell array
of character vectors, or a string array representing duration strings or
a numeric array representing days.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Equality for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.mad


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 389
duration: M = mad ( D )
duration: M = mad ( D , opt )
duration: M = mad ( D , opt , dim )
duration: M = mad ( D , opt , vecdim )
duration: M = mad ( D , opt , 'all' )

Compute the mean or median absolute deviation of a duration array.

This method overloads the core mad function for duration arrays.
The functionality is identical to core mad function.
Type help mad for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
Compute the mean or median absolute deviation of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.mape


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 673
duration: E = mape ( F , A )
duration: E = mape ( F , A , dim )
duration: E = mape ( F , A , vecdim )
duration: E = mape ( F , A , 'all' )
duration: E = mape (&hellip;, nanflag )
duration: E = mape (&hellip;, zeroflag )
duration: E = mape (&hellip;, 'Weights' , W )

Compute the mean absolute percentage error between duration arrays.

This method overloads the core mape function for duration arrays.
The functionality is identical to core mape function.
Type help mape for more information.

Note that MAPE is expressed as a percentage. Thus, the returned argument
is a numeric array of double type and not a duration array. However,
both F and A must be duration arrays.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
Compute the mean absolute percentage error between duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.max


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 646
duration: M = max ( D )
duration: M = max ( D , [] , dim )
duration: M = max ( D , [] , vecdim )
duration: M = max ( D , [] , 'all' )
duration: M = max ( D , [] , nanflag )
duration: M = max ( D , [] , &hellip;, nanflag )
duration: [ M , index ] = max (&hellip;)
duration: [ M , index ] = max (&hellip;, 'linear' )
duration: M = max ( D1 , D2 )
duration: M = max ( D1 , D2 , nanflag )
duration: &hellip; = max (&hellip;, 'ComparisonMethod' , method )

Find maximum values in duration arrays.

This method overloads the core max function for duration
arrays. The functionality is identical to core max function.
Type help max for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Find maximum values in duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.maxk


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1259
duration: B = maxk ( A , K )
duration: B = maxk ( A , K , dim )
duration: [ B , index ] = maxk ( A , &hellip;)

Find the largest elements in a duration array.

B = maxk ( A , K ) returns the K largest
elements of the duration array A in descending order. If A
is a vector, then B is a vector with K elements. If A
is a matrix, then maxk operates along each column of A and
B has K rows. For multidimensional arrays, maxk
operates along the first non-singleton dimension.

B = maxk ( A , K , dim ) operates along the
dimension specified by dim .

K must be a nonnegative integer scalar. If K is larger than
the number of elements along the operating dimension, then all of them
are returned. Inf and -Inf are ranked as ordinary
values.

Missing elements ( NaN ) are not ranked. They are appended after
the ranked elements in their original order, and hence they only appear
in B when K exceeds the number of non-missing elements along
the operating dimension. Unlike sort , maxk has no
'MissingPlacement' option, since NaN elements are always
placed last. Elements comparing as equal keep their original order.

[ B , index ] = maxk ( A , &hellip;) also returns an
index array containing the indices of the returned elements of A
along the operating dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Find the largest elements in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.mean


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 461
duration: M = mean ( D )
duration: M = mean ( D , dim )
duration: M = mean ( D , vecdim )
duration: M = mean ( D , 'all' )
duration: M = mean (&hellip;, nanflag )
duration: M = mean (&hellip;, outtype )
duration: M = mean (&hellip;, 'Weights' , W )

Compute the mean of the elements of a duration array.

This method overloads the core mean function for duration arrays.
The functionality is identical to core mean function.
Type help mean for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Compute the mean of the elements of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.median


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 441
duration: M = median ( D )
duration: M = median ( D , dim )
duration: M = median ( D , vecdim )
duration: M = median ( D , 'all' )
duration: M = median (&hellip;, nanflag )
duration: M = median (&hellip;, outtype )

Compute the median value of the elements of a duration array.

This method overloads the core median function for duration
arrays. The functionality is identical to core median function.
Type help median for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Compute the median value of the elements of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
duration.milliseconds


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 219
duration: X = milliseconds ( D )

Duration equivalent numeric values in milliseconds.

X = milliseconds ( D ) converts durations in D to
the equivalent number of milliseconds. X is a double array of the
same size as D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Duration equivalent numeric values in milliseconds.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.min


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 646
duration: M = min ( D )
duration: M = min ( D , [] , dim )
duration: M = min ( D , [] , vecdim )
duration: M = min ( D , [] , 'all' )
duration: M = min ( D , [] , nanflag )
duration: M = min ( D , [] , &hellip;, nanflag )
duration: [ M , index ] = min (&hellip;)
duration: [ M , index ] = min (&hellip;, 'linear' )
duration: M = min ( D1 , D2 )
duration: M = min ( D1 , D2 , nanflag )
duration: &hellip; = min (&hellip;, 'ComparisonMethod' , method )

Find minimum values in duration arrays.

This method overloads the core min function for duration
arrays. The functionality is identical to core min function.
Type help min for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Find minimum values in duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.mink


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1260
duration: B = mink ( A , K )
duration: B = mink ( A , K , dim )
duration: [ B , index ] = mink ( A , &hellip;)

Find the smallest elements in a duration array.

B = mink ( A , K ) returns the K smallest
elements of the duration array A in ascending order. If A
is a vector, then B is a vector with K elements. If A
is a matrix, then mink operates along each column of A and
B has K rows. For multidimensional arrays, mink
operates along the first non-singleton dimension.

B = mink ( A , K , dim ) operates along the
dimension specified by dim .

K must be a nonnegative integer scalar. If K is larger than
the number of elements along the operating dimension, then all of them
are returned. Inf and -Inf are ranked as ordinary
values.

Missing elements ( NaN ) are not ranked. They are appended after
the ranked elements in their original order, and hence they only appear
in B when K exceeds the number of non-missing elements along
the operating dimension. Unlike sort , mink has no
'MissingPlacement' option, since NaN elements are always
placed last. Elements comparing as equal keep their original order.

[ B , index ] = mink ( A , &hellip;) also returns an
index array containing the indices of the returned elements of A
along the operating dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Find the smallest elements in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.minus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 700
duration: C = minus ( A , B )

Subtraction for duration arrays.

C = minus ( A , B ) is the equivalent of the syntax
C = A - B and returns the subtraction of B
from A by subtracting the corresponding elements. A and
B must be size compatible, which translates to they can be the same
size, one can be scalar, or for every dimension, their dimension sizes
must be equal or one of them must be 1. The size of C is
determined by the size compatibility of A and B .

One of the input arguments can also be a numeric array in which case its
elements are treated as a number of 24-hour days. If the second argument
B is a calendarDuration arrays, then the returned array C is
also a calendarDuration array.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Subtraction for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.minutes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 199
duration: X = minutes ( D )

Duration equivalent numeric values in minutes.

X = minutes ( D ) converts durations in D to the
equivalent number of minutes. X is a double array of the same size
as D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Duration equivalent numeric values in minutes.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.mldivide


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 771
duration: C = mldivide ( A , B )

Left division of duration arrays, A \ B .

C = mldivide ( A , B ) divides B by A .
The denominator A decides what the result means and must be a
scalar. Dividing a duration by a number scales it, giving a
duration ; dividing one duration by another gives how many
times one goes into the other, a plain number carrying no unit. A zero
denominator gives Inf , as it does for numbers.

Dividing a number by a duration is not defined, having no meaning,
and neither is a non-scalar denominator. The display format of a
duration result is that of B .

Unlike MATLAB, an integer denominator is accepted and converted, as it is
by rdivide and times here; MATLAB requires a double
while accepting a logical , which the same rule cannot explain.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Left division of duration arrays, A \ B.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.mod


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 677
duration: C = mod ( A , B )

Remainder after division of duration arrays, with the sign of the
divisor.

C = mod ( A , B ) returns the remainder left after
dividing A by B , as a duration array of the size the
two broadcast to. At least one of A and B must be a
duration ; the other may be a duration or a numeric array,
which is read as a number of days, the unit a duration counts in.

The result takes its sign from B and is zero when B is, which
is what distinguishes mod from rem : mod of an hour
by -1 day differs from rem of the same. A remainder by a
zero duration is A itself. The display format is taken from
whichever operand is a duration , or from A when both are.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
Remainder after division of duration arrays, with the sign of the divisor.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.mode


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 388
duration: M = mode ( D )
duration: M = mode ( D , dim )
duration: M = mode ( D , vecdim )
duration: M = mode ( D , 'all' )
duration: [ M , F , C ] = mode (&hellip;)

Compute the most frequently occurring value in a duration array.

This method overloads the core mode function for duration arrays.
The functionality is identical to core mode function.
Type help mode for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
Compute the most frequently occurring value in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.mrdivide


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 564
duration: C = mrdivide ( A , B )

Right division of duration arrays, A / B .

C = mrdivide ( A , B ) divides A by B
and is the mirror of mldivide : A / B is
B \ A . The denominator B decides what the
result means and must be a scalar. Dividing a duration by a
number scales it, giving a duration ; dividing one duration
by another gives how many times one goes into the other, a plain number
carrying no unit.

Dividing a number by a duration is not defined, and neither is a
non-scalar denominator. For element-wise division by an array of
divisors, see rdivide .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Right division of duration arrays, A / B.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.mtimes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 393
duration: C = times ( A , B )

Matrix multiplication for duration arrays.

C = mtimes ( A , B ) is the equivalent of the
syntax C = A * B and returns the matrix
multiplication product of input arrays A and B , one of which
must be a numeric array and the other a duration array.

The columns of A must equal the rows of B and the size of
C is determined by the rows of A and the columns of B .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Matrix multiplication for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.ndims


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 148
duration: out = ndims ( D )

Number of dimensions in a duration array.

out = ndims ( D ) returns the number of dimensions of
the duration array D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Number of dimensions in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
duration.ne


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 696
duration: TF = ne ( A , B )

Equality for duration arrays.

TF = ne ( A , B ) is the equivalent of the syntax
TF = A != B and returns a logical array whose
elements set to true where the corresponding elements of A
and B are not equal and set to false otherwise.

A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1. The size of
C is determined by the size compatibility of A and B .

One of the input arguments can also be a character vector, a cell array
of character vectors, or a string array representing duration strings or
a numeric array representing days.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Equality for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.nnz


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 154
duration: out = nnz ( D )

Number of nonzero elements in duration array.

out = nnz ( D ) returns the number of nonzero
elements in the duration array D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Number of nonzero elements in duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.numel


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 150
duration: out = numel ( D )

Total number of elements in a duration array.

out = numel ( D ) returns the number of elements in the
duration array D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Total number of elements in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.permute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 441
duration: B = permute ( A , dims )

Generalized transpose for a duration N-D array.

B = permute ( A , dims ) returns the generalized
transpose of the duration array A by rearranging its dimensions
according to the permutation vector specified in dims .

dims must index all the dimensions 1:ndims ( A ) of the
input array A , in any order, but only once. The N th
dimension of A gets remapped to the dimension in B specified
by dims ( N ) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Generalized transpose for a duration N-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.plus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 681
duration: C = plus ( A , B )

Addition for duration arrays.

C = plus ( A , B ) is the equivalent of the syntax
C = A + B and returns the sum of A and
B by adding the corresponding elements. A and B must
be size compatible, which translates to they can be the same size, one
can be scalar, or for every dimension, their dimension sizes must be
equal or one of them must be 1. The size of C is determined by the
size compatibility of A and B .

One of the input arguments can also be a numeric array in which case its
elements are treated as a number of 24-hour days. If the second argument
B is a calendarDuration arrays, then the returned array C is
also a calendarDuration array.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Addition for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.prctile


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 442
duration: Q = prctile ( D )
duration: q = prctile ( D , p )
duration: Q = prctile ( D , p , dim )
duration: Q = prctile ( D , p , vecdim )
duration: Q = prctile ( D , p , 'all' )
duration: Q = prctile ( D , p , &hellip;, method )

Compute the percentiles of a duration array.

This method overloads the core prctile function for duration
arrays. The functionality is identical to core prctile function.
Type help prctile for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Compute the percentiles of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.quantile


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 552
duration: Q = quantile ( D )
duration: Q = quantile ( D , p )
duration: Q = quantile ( D , n )
duration: Q = quantile ( D , &hellip;, dim )
duration: Q = quantile ( D , &hellip;, vecdim )
duration: Q = quantile ( D , &hellip;, 'all' )
duration: Q = quantile ( D , p , &hellip;, method )
duration: Q = quantile ( D , n , &hellip;, method )

Compute the quantiles of a duration array.

This method overloads the core quantile function for duration
arrays. The functionality is identical to core quantile function.
Type help quantile for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Compute the quantiles of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.range


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 368
duration: R = range ( D )
duration: R = range ( D , dim )
duration: R = range ( D , vecdim )
duration: R = range ( D , 'all' )
duration: R = range (&hellip;, nanflag )

Compute the range of a duration array.

This method overloads the core range function for duration arrays.
The functionality is identical to core range function.
Type help range for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Compute the range of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.rdivide


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 675
duration: C = rdivide ( A , B )

Element-wise right division for duration arrays.

C = rdivide ( A , B ) is the equivalent of the
syntax C = A ./ B and returns the element-wise
division of the duration array A by the corresponding elements of
input array B , which can either be a duration or a numeric array.
If B is a duration array, then C is a double numeric array.
If B is a numeric array, then C is a duration array.

A and B must be size compatible, which translates to they
can be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1. The size of
C is determined by the size compatibility of A and B .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Element-wise right division for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.rem


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 661
duration: C = rem ( A , B )

Remainder after division of duration arrays, with the sign of the
dividend.

C = rem ( A , B ) returns the remainder left after
dividing A by B , as a duration array of the size the
two broadcast to. At least one of A and B must be a
duration ; the other may be a duration or a numeric array,
which is read as a number of days, the unit a duration counts in.

The result takes its sign from A , where mod takes it from
B : the two agree only where the operands share a sign. A remainder
by a zero duration is NaN , where mod gives A itself.
The display format is taken from whichever operand is a duration ,
or from A when both are.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 75
Remainder after division of duration arrays, with the sign of the dividend.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.repelem


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 966
duration: B = repelem ( A , n )
duration: B = repelem ( A , d1 , &hellip;, dN )

Repeat copies of duration array elements.

B = repelem ( A , n ) returns a duration vector
B containing repeated elements of the input A , which must be
a duration vector. If n is a scalar, each element of A is
repeated n times along the non-singleton dimension of A . If
n is a vector, it must have the same elements as A , in which
case it specifies the number of times to repeat each corresponding
element of A .

B = repelem ( A , d1 , &hellip;, dN ) returns
an array B with each element of A repeated according to the
the list of input arguments d1 , &hellip;, dN each
corresponding to a different dimension 1:ndims ( A ) of the
input array A . d1 , &hellip;, dN must be either scalars
or vectors with the same length as the corresponding dimension of
A containing non-negative integer values specifying the number of
repetitions of each element along the corresponding dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Repeat copies of duration array elements.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.repelems


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 445
duration: B = repelems ( A , R )

Construct a vector of repeated duration array.

B = repelems ( A , R ) returns a duration vector
B containing repeated elements of the input A , which must be
a duration vector. R must be a 2&times;N matrix of integers.
Entries in the first row of R correspond to the linear indexing of
the elements in A to be repeated. The corresponding entries in the
second row of R specify the repeat count of each element.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Construct a vector of repeated duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.repmat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 610
duration: B = repmat ( A , n )
duration: B = repmat ( A , d1 , &hellip;, dN )
duration: B = repmat ( A , dimvec )

Repeat copies of a duration array.

B = repmat ( A , n ) returns a duration array
B containing n copies of the input duration array A
along every dimension of A .

B = repmat ( A , d1 , &hellip;, dN ) returns an
array B containing copies of A along the dimensions specified
by the list of scalar integer values d1 , &hellip;, dN , which
specify how many copies of A are made in each dimension.

B = repmat ( A , dimvec ) is equivalent to the
previous syntax with dimvec = [ d1 , &hellip;, dN ] .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Repeat copies of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.reshape


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 752
duration: B = reshape ( A , d1 , &hellip;, dN )
duration: B = reshape ( A , &hellip;, [] , &hellip;)
duration: B = reshape ( A , dimvec )

Reshape duration array.

B = reshape ( A , d1 , &hellip;, dN ) returns a
duration array B with specified dimensions d1 , &hellip;,
dN , whose elements are taken columnwise from the duration array
A . The product of d1 , &hellip;, dN must equal the total
number of elements in A .

B = reshape ( A , &hellip;, [] , &hellip;) returns
a duration array B with one dimension unspecified which is
calculated automatically so that the product of dimensions in B
matches the total elements in A , which must be divisible the
product of specified dimensions. An empty matrix ([]) is used to
flag the unspecified dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Reshape duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.rmse


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 444
duration: E = rmse ( F , A )
duration: E = rmse ( F , A , dim )
duration: E = rmse ( F , A , vecdim )
duration: E = rmse ( F , A , 'all' )
duration: E = rmse (&hellip;, nanflag )
duration: E = rmse (&hellip;, 'Weights' , W )

Compute the root mean squared error between duration arrays.

This method overloads the core rmse function for duration arrays.
The functionality is identical to core rmse function.
Type help rmse for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
Compute the root mean squared error between duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.round


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 536
duration: Y = round ( D )
duration: Y = round ( D , unit )

Round to the nearest integer time unit for duration arrays.

Y = round ( D ) rounds each element of the duration
array D to the nearest integer number of seconds to that element.
In case of a tie, return the one further away from zero.

Y = round ( D , unit ) rounds each element of the
duration array D to the nearest integer number of the specified
unit of time to that element. unit must be one of the following
values:

'seconds' (default)
'minutes'
'hours'
'days'
'years'


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
Round to the nearest integer time unit for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.seconds


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 199
duration: X = seconds ( D )

Duration equivalent numeric values in seconds.

X = seconds ( D ) converts durations in D to the
equivalent number of seconds. X is a double array of the same size
as D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Duration equivalent numeric values in seconds.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.setdiff


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1306
duration: C = setdiff ( A , B )
duration: C = setdiff ( A , B , 'rows' )
duration: C = setdiff ( A , B , &hellip;, order )
duration: [ C , ixA ] = setdiff (&hellip;)

Set difference of two duration arrays.

C = setdiff ( A , B ) returns the unique common
values of the duration arrays A and B . Either A or
B input arguments can also be a duration string specified as a
character vector, a string array, or a cell array of character vectors,
or a numeric array representing 24-hour days. In such case, the input is
promoted to a duration array prior to calculating the intersection. If
both A and B are row vectors, then C is also a row
vector, otherwise intersect returns a column vector.

C = setdiff ( A , B , 'rows' returns the
unique common rows of the duration matrices A and B , which
must have the same number of columns. By default, the rows in duration
matrix C are in sorted order.

&hellip; = setdiff ( A , B , &hellip;, order ) also
specifies the order of the returned unique values. order can be
'sorted' , which is the default behavior, or 'stable' , in
which case the unique values are returned in order of appearance.

[ C , ixA ] = setdiff (&hellip;) also returns the index
vector ixA such that C = A ( ixA ) , unless
the 'rows' optional argument is given, in which case
C = A ( ixA ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Set difference of two duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.setxor


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1355
duration: C = setxor ( A , B )
duration: C = setxor ( A , B , 'rows' )
duration: C = setxor ( A , B , &hellip;, order )
duration: [ C , ixA , ixB ] = setxor (&hellip;)

Set exclusive-or of two duration arrays.

C = setxor ( A , B ) returns the unique common
values of the duration arrays A and B . Either A or
B input arguments can also be a duration string specified as a
character vector, a string array, or a cell array of character vectors,
or a numeric array representing 24-hour days. In such case, the input is
promoted to a duration array prior to calculating the intersection. If
both A and B are row vectors, then C is also a row
vector, otherwise intersect returns a column vector.

C = setxor ( A , B , 'rows' returns the
unique common rows of the duration matrices A and B , which
must have the same number of columns. By default, the rows in
duration matrix C are in sorted order.

&hellip; = setxor ( A , B , &hellip;, order ) also
specifies the order of the returned unique values. order can be
'sorted' , which is the default behavior, or 'stable' , in
which case the unique values are returned in order of appearance.

[ C , ixA , ixB ] = setxor (&hellip;) also returns
index vectors ixA and ixB such that
C = A ( ixA ) and
C = B ( ixB ) , unless the 'rows' optional
argument is given, in which case C = A ( ixA ,:)
and C = B ( ixB ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Set exclusive-or of two duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.sign


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 466
duration: out = sign ( D )
duration: out = sign ( D , unit )

Compute the signum function for duration arrays.

out = sign ( D ) returns an array of doubles, out ,
the same size as the duration array D , where each element has one
following values:

1 if the corresponding element of D is greater than 0.
0 if the corresponding element of D is equal to 0.
-1 if the corresponding element of D is less than 0.
NaN if the corresponding element of D is a missing value.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Compute the signum function for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1071
duration: sz = size ( D )
duration: dim_sz = size ( D , dim )
duration: dim_sz = size ( D , d1 , d2 , &hellip;)
duration: [ rows , columns , &hellip;, dim_n_sz ] = size (&hellip;)

Return the size of a duration array.

sz = size ( D ) returns a row vector with the size
(number of elements) of each dimension for the duration array D .

dim_sz = size ( D , dim ) returns the size of
the corresponding dimension specified in dim . If dim is a
vector, then dim_sz is a vector of the same length and with each
element corresponding to a specified dimension. Multiple dimensions may
also be specified as separate arguments.

With a single output argument, size returns a row vector. With
several, the size of dimension N is returned in the Nth argument.
Asking for fewer output arguments than the array has dimensions folds
the trailing dimensions into the last one, so [r, c] = size
( D ) on a 2-by-2-by-2 array returns 2 and 4; asking for more pads
with ones. When a dimension is named, however, the number of output
arguments must equal the number of dimensions requested.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Return the size of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.skewness


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 551
duration: y = skewness ( D )
duration: y = skewness ( D , flag )
duration: y = skewness ( D , flag , dim )
duration: y = skewness ( D , flag , vecdim )
duration: y = skewness ( D , flag , 'all' )

Compute the sample skewness of a duration array.

This method overloads the core skewness function for duration
arrays. The functionality is identical to core skewness function.
Type help skewness for more information.

Note that skewness is a dimensionless quantity Thus, the returned
argument is a numeric array of double type and not a duration array.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Compute the sample skewness of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
duration.sort


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1921
duration: B = sort ( A )
duration: B = sort ( A , dim )
duration: B = sort ( A , direction )
duration: B = sort ( A , dim , direction )
duration: B = sort (&hellip;, 'MissingPlacement' , MP )
duration: B = sort (&hellip;, 'ComparisonMethod' , CM )
duration: [ B , index ] = sort ( A , &hellip;)

Sort elements in a duration array.

B = sort ( A ) sorts the duration array A in
ascending order. If A is a matrix, sort ( A ) sorts
each column of A in ascending order. For multidimensional arrays,
mode ( A ) sorts along the first non-singleton dimension.

B = sort ( A , dim ) sorts along the dimension
specified by dim .

B = sort ( A , direction ) also specifies the
sorting direction, which can be either 'ascend' (default) or
'descend' .

B = sort (&hellip;, 'MissingPlacement' , MP )
specifies where to place the missing elements ( <undefined> )
returned in B with one of the following options specified in
MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.

B = sort (&hellip;, 'ComparisonMethod' , CM )
specifies the comparison method for determining the order of elements
returned in B with one of following options:

'auto' , which is the default, sorts by real (A) .
'real' sorts by real (A) .
'abs' sorts by abs (A) .

[ B , index ] = sort ( A , &hellip;) also returns a
sorting index containing the original indices of the elements in the
sorted array. index is the same size as A and it comprises
indexing vectors oriented along the operating dimensions.

If A is a vector, then index contains the original
linear indices of the elements in the sorted vector B such that
B = A ( index ) .
If A is an M&times;N matrix and dim = 1 , then
index contains the original row indices of the elements in the
sorted vector B such that for j = 1:N ,
B (:,j) = A ( index (:,j),j) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Sort elements in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.sortrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2028
duration: B = sortrows ( A )
duration: B = sortrows ( A , col )
duration: B = sortrows ( A , direction )
duration: B = sortrows ( A , col , direction )
duration: B = sortrows (&hellip;, 'MissingPlacement' , MP )
duration: [ B , index ] = sortrows ( A , &hellip;)

Sort rows in a duration array.

B = sortrows ( A ) sorts the rows of the 2-D duration
array A in ascending order. The sorted array B has the same
size as A .

B = sortrows ( A , col ) sorts A according to
to the columns specified by the numeric vector col , which must
explicitly contain non-zero integers whose absolute values index existing
columns in A . Positive elements sort the corresponding columns in
ascending order, while negative elements sort the corresponding columns
in descending order.

B = sortrows ( A , direction ) also specifies the
sorting direction, which can be either 'ascend' (default) or
'descend' applying to all columns in A . Alternatively,
direction can be either a string array or a cell array of character
vectors specifying the sorting direction for each individual column of
A , in which case the number of elements in direction must
equal the number of columns in A .

B = sortrows ( A , col , direction ) sorts the
categorical array A according to the columns specified in col
using the corresponding sorting direction specified in direction .
In this case, the sign of the values in col is ignored. col
and direction must have the same number of elements, but not
necessarily equal to the columns of A .

B = sortrows (&hellip;, 'MissingPlacement' , MP )
specifies where to place the missing elements ( NaN ) returned in
B with any of the following options specified in MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.

[ B , index ] = sortrows ( A , &hellip;) also returns
an index vector containing the original row indices of A in the
sorted matrix B such that B = A ( index ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Sort rows in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.std


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 442
duration: S = std ( D )
duration: S = std ( D , w )
duration: S = std ( D , w , dim )
duration: S = std ( D , w , vecdim )
duration: S = std ( D , w , 'all' )
duration: S = std (&hellip;, nanflag )
duration: [ S , M ] = std (&hellip;)

Compute the standard deviation of a duration array.

This method overloads the core std function for duration arrays.
The functionality is identical to core std function.
Type help std for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Compute the standard deviation of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
duration.sum


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 366
duration: S = sum ( D )
duration: S = sum ( D , dim )
duration: S = sum ( D , vecdim )
duration: S = sum ( D , 'all' )
duration: S = sum (&hellip;, nanflag )

Compute the sum of the elements of a duration array.

This method overloads the core sum function for duration arrays.
The functionality is identical to core sum function. Type
help sum for more information.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Compute the sum of the elements of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.times


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 584
duration: C = times ( A , B )

Element-wise multiplication for duration arrays.

C = times ( A , B ) is the equivalent of the syntax
C = A .* B and returns the element-by-element
multiplication product between the corresponding elements of input arrays
A and B , one of which must be a numeric array and the other a
duration array.

A and B must be size compatible, which translates to they
can be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1. The size of
C is determined by the size compatibility of A and B .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Element-wise multiplication for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
duration.topkrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2200
duration: B = topkrows ( A , K )
duration: B = topkrows ( A , K , col )
duration: B = topkrows ( A , K , direction )
duration: B = topkrows ( A , K , col , direction )
duration: B = topkrows (&hellip;, 'MissingPlacement' , MP )
duration: [ B , index ] = topkrows ( A , &hellip;)

Top K sorted rows of a duration array.

B = topkrows ( A , K ) returns the top K rows
of the 2-D duration array A sorted in descending order as a group.
K must be a nonnegative integer scalar. If K is larger than
the number of rows in A , then all of them are returned.

Missing elements ( NaN ) are not ranked. Within each sort
column they are placed after the elements that are defined, whichever
direction is asked for, so a row is demoted only by a missing element in
a column that actually decides its position. Rows comparing as equal
keep their original order.

B = topkrows ( A , K , col ) sorts using only
the columns listed in the numeric vector col , which must contain
positive integers indexing existing columns in A . Columns are used
as sort keys in the order given, and those not listed are not used at
all. The direction is descending unless direction says otherwise.

B = topkrows ( A , K , direction ) sorts in
the given direction , either 'descend' (default) or
'ascend' applying to all columns in A . Alternatively,
direction can be a cell array of character vectors specifying the
sorting direction for each individual column of A .

B = topkrows ( A , K , col , direction )
combines an explicit column list with a per-column direction .

B = topkrows (&hellip;, 'MissingPlacement' , MP )
specifies where the missing elements are placed within each sort column,
with any of the following options specified in MP :

'last' , which is the default, places missing elements last
whichever direction is asked for.
'first' places missing elements first.
'auto' places missing elements last for an ascending sort
and first for a descending one, as sortrows does.

This is an Octave extension: MATLAB has no such option here and always
ranks as 'last' does.

[ B , index ] = topkrows ( A , &hellip;) also returns
an index vector containing the original row indices of A in
B , such that B = A ( index ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Top K sorted rows of a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
duration.transpose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 174
duration: B = transpose ( A )

Transpose a duration matrix.

B = transpose ( A ) is the equivalent of the syntax
B = A .' and returns the transpose of the duration
matrix A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Transpose a duration matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.uminus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 173
duration: B = uminus ( A )

Unary minus for duration arrays.

B = uminus ( A ) is the equivalent of the syntax
B = - A and returns the input array with its elements
negated.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Unary minus for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.union


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1340
duration: C = union ( A , B )
duration: C = union ( A , B , 'rows' )
duration: C = union ( A , B , &hellip;, order )
duration: [ C , ixA , ixB ] = union (&hellip;)

Set union of two duration arrays.

C = union ( A , B ) returns the unique common
values of the duration arrays A and B . Either A or
B input arguments can also be a duration string specified as a
character vector, a string array, or a cell array of character vectors,
or a numeric array representing 24-hour days. In such case, the input is
promoted to a duration array prior to calculating the intersection. If
both A and B are row vectors, then C is also a row
vector, otherwise intersect returns a column vector.

C = union ( A , B , 'rows' returns the
unique common rows of the duration matrices A and B , which
must have the same number of columns. By default, the rows in
duration matrix C are in sorted order.

&hellip; = union ( A , B , &hellip;, order ) also
specifies the order of the returned unique values. order can be
'sorted' , which is the default behavior, or 'stable' , in
which case the unique values are returned in order of appearance.

[ C , ixA , ixB ] = union (&hellip;) also returns
index vectors ixA and ixB such that
C = A ( ixA ) and
C = B ( ixB ) , unless the 'rows' optional
argument is given, in which case C = A ( ixA ,:)
and C = B ( ixB ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Set union of two duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
duration.unique


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1865
duration: B = unique ( A )
duration: B = unique ( A , setOrder )
duration: B = unique ( A , occurrence )
duration: B = unique ( A , setOrder , occurrence )
duration: B = unique ( A , occurrence , setOrder )
duration: B = unique ( A , &hellip;, 'rows' )
duration: [ B , ixA , ixB ] = unique (&hellip;)

Unique values in a duration array.

B = unique ( A ) returns the unique values of the
duration array A in sorted order.

B = unique ( A , setOrder ) returns the unique
values of the duration array A in an order as specified by
setOrder , which can be either of the following values:

'sorted' (default) returns the unique values sorted in
ascending order.
'stable' returns the unique values according to their order
of occurrence.

B = unique ( A , occurrence ) returns the unique
values of the duration array A according to their order of
occurrence. occurrence can be either of the following values:

'first' (default) returns the first occurrence of each
unique value, i.e. the lowest possible indices are returned.
'last' returns the last occurrence of each unique value,
i.e. the highest possible indices are returned.

You can specify setOrder and occurrence arguments together.

B = unique ( A , &hellip;, 'rows' ) returns the
unique rows of A by treating each row as a single entity. The
'rows' option can be used alone or in any combination with the
setOrder and occurrence arguments. 'rows' can be
placed at any position in the function&rsquo;s argument list after the input
array A . However, this syntax is only valid for 2-dimensional
duration arrays.

[ B , ixA , ixB ] = unique (&hellip;) also returns
index vectors ixA and ixB using any of the previous syntaxes.
ixA and ixB map the arrays A and B to one another
such that B = A ( ixA ) and
A = B ( ixB ) . When the 'rows' optional
argument is specified, then B = A ( ixA ,:) and
A = B ( ixB ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Unique values in a duration array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.uplus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 154
duration: B = uplus ( A )

Unary plus for duration arrays.

B = uplus ( A ) is the equivalent of the syntax
B = + A and returns the input array unaltered.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Unary plus for duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
duration.vertcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 554
duration: C = vertcat ( A , B , &hellip;)

Vertical concatenation of duration arrays.

C = vertcat ( A , B , &hellip; is the equivalent of
the syntax B = [ A ; B ; &hellip;] and vertically
concatenates the duration arrays A , B , &hellip;. All input
arrays must have the same size except along the first dimension. All of
the input arrays may also be string arrays or cell arrays of character
vectors of compatible size. Additionally, an input can be a numeric
matrix, which when parsed to the constructor will return a duration array
of compatible size.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Vertical concatenation of duration arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
duration.years


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 247
duration: X = years ( D )

Duration equivalent numeric values in fixed-length years.

X = years ( D ) converts durations in D to the
equivalent number of fixed-length years (1 year equals 365.2425 days).
X is a double array of the same size as D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
Duration equivalent numeric values in fixed-length years.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
eventfilter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 818
datatypes: eventfilter

Subscript into a timetable by what was happening rather than by when.

A utility class that builds a condition against the variables of the
event table attached to a timetable, and selects the rows the matching
events cover. The condition picks out events ; the rows follow
from them.

ef = eventfilter (tt);
tt(ef.EventLabels == "rain", :)

An event covers the times from its own onwards and stops short of its
end, and an event with neither a length nor an end covers only a row at
exactly its own time. Rows covered by more than one matching event are
selected once: a filter answers which rows, not how often.

Time names the event&rsquo;s own time, not the row&rsquo;s, so
ef.Time > d selects the rows of the events that began after
d .

See also:
eventtable,
timerange,
withtol,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
Subscript into a timetable by what was happening rather than by when.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
eventfilter.eventTimes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 240
eventfilter: t = eventTimes ( ef , tt )

Return the times of the events of tt the filter matches.

The times come back in the order the event table holds them. It is
what a timerange reads when an event filter is given as one of
its bounds.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Return the times of the events of tt the filter matches.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
eventfilter.eventfilter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 825
eventfilter: ef = eventfilter ( tt )
eventfilter: ef = eventfilter ( eventLabels )

Create an event filter.

ef = eventfilter ( tt ) creates a filter that may be
written against the variables of the event table attached to the
timetable tt , together with Time , the events&rsquo; own times.
tt must have an event table attached, since the names come from
it.

ef = eventfilter ( eventLabels ) creates a filter
that matches the events carrying any of the given labels, without a
timetable to take the names from. It is a whole condition already and
needs no comparison written against it.

A filter is used as a row subscript, and selects the rows the matching
events cover. Conditions combine with & and | ;
~ is not supported, an event filter having no complement worth
the name.

See also:
eventtable,
timerange,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Create an event filter.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
eventfilter.properties


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 280
eventfilter: names = properties ( ef )

Return the names a condition may be written against.

They are the variables of the event table the filter came from,
together with Time . A filter made from a list of labels
carries none, having been given no event table to read them from.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Return the names a condition may be written against.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
eventfilter.rowIndices


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 100
eventfilter: ix = rowIndices ( ef , tt )

Return the positions of the rows of tt the filter selects.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Return the positions of the rows of tt the filter selects.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
eventtable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2964
datatypes: eventtable

Timetable of events, describing what was happening rather than what was
measured.

An event table is a timetable whose rows are events. Each row has
a time, optionally a label naming the event, and optionally a length or
an end time making it an interval rather than an instant. It exists so
that the rows of another timetable can be selected by what was happening
when they were recorded, rather than by the clock alone.

An event table is a timetable and inherits every one of its
methods. help does not follow method inheritance, so
help eventtable.sortrows does not resolve and
help timetable.sortrows is where that method is documented; where
a method behaves differently for an event table, its own documentation
says so.

Three properties say which variables describe the events, and each holds
a variable name rather than the values themselves:

EventLabelsVariable , the variable naming each event.

EventLengthsVariable , how long each event lasted.

EventEndsVariable , when each event finished.

The last two are mutually exclusive: an event says its extent one way or
the other, never both. An event with neither is an instant.

Because the properties hold names, an operation that stops a name
resolving affects the property. Removing the variable clears it, and so
does deleting it by assigning an empty matrix; renaming the
variable carries the property across to the new name, which is a
deliberate departure from MATLAB, where the designation is lost and
renaming back does not restore it. Moving a variable or converting its
type leaves the property alone.

An event table cannot itself carry an event table. It has no
Events property, and asking for one raises.

An interval event is half-open on the right: an event beginning at
02:00 and lasting two hours covers 02:00 and 03:00 but not 04:00. An
event of zero length therefore covers nothing at all.

Three things read an event table once it is attached to a timetable by
that timetable&rsquo;s Events property. syncevents copies the
events&rsquo; data onto the rows they cover, repeating a row that more than
one event covers. eventfilter selects the rows the events
matching a condition cover, and a row covered more than once is selected
once. timerange takes two event filters as bounds, running from
one event to another. In the other direction, extractevents
builds an event table out of a timetable&rsquo;s own rows.

A binary operation over two timetables carrying event tables merges
them, and refuses where their three event properties disagree; a
row-preserving one carries the event table through unchanged.

Labels given as text are held as a cell array of character vectors,
which is how this package holds a list of names; a string given
as such is kept as one. An eventfilter compares either as text,
so a condition reads the same whichever they are.

See also:
timetable,
table,
istimetable ,
eventfilter,
timetable.extractevents,
timetable.syncevents


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 81
Timetable of events, describing what was happening rather than what was measured.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
eventtable.CustomProperties


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1148
tabular: property CustomProperties

Customized metadata of table and its variables

Custom properties that contain metadata of a table and its variables.
By default, this is an empty container. Each custom property holds
either table metadata or per-variable metadata, according to the property
type ( 'table' or 'variable' ) specified when the property
is created with the addprop method. A variable-scoped property
holds one element per variable.

You can add an individual custom property only by using the
addprop method and you can only remove a custom property with the
rmprop method. To access existing custom properties use dot name
structure assignment as in
tbl .Properties.CustomProperties. PropertyName , where
PropertyName is the name used with the addprop method.

The whole set may also be taken from another table by assigning that
table&rsquo;s CustomProperties to this one, which replaces every
custom property with those of the other table, their types included. A
variable-scoped property arriving that way must hold one element for
each variable of the receiving table, or be a 0-by-0 empty. Nothing
else can be assigned there.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Customized metadata of table and its variables



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
eventtable.Description


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 303
tabular: property Description

Table description

Table description specified as a character vector or a string scalar.
If specified as a string scalar, it is converted and stored internally
as a character vector. You can access the Description property
of a table tbl with tbl .Properties.Description .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
Table description



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
eventtable.DimensionNames


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 654
tabular: property DimensionNames

Dimension names

Dimension names specified as a two-element cell array of character
vectors or a two-element string array. If specified as a string array,
it is converted and stored internally as a cell array of character
vectors. You can access the DimensionNames property of a table
tbl with tbl .Properties.DimensionNames .

By default, DimensionNames is specified as
'Row', 'Variables' . You can access table data per rows or per
columns by using either one of the two dimension names, respectively.
However, if the table contains row names, then the first element of the
DimensionNames corresponds to the row names.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
Dimension names



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
eventtable.EventEndsVariable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 400
eventtable: property EventEndsVariable

Variable holding when each event finished

Variable holding when each event finished, given as the name of one of
the event table&rsquo;s own variables, or empty when the events are
instants. The variable holds the same type as the row times. It
cannot be set while EventLengthsVariable is set; an event
states its extent as a length or as an end, not as both.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Variable holding when each event finished



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
eventtable.EventLabelsVariable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 548
eventtable: property EventLabelsVariable

Variable naming each event

Variable naming each event, given as the name of one of the event
table&rsquo;s own variables, or empty when no variable names the events.
Assigning a name points the property at that variable; assigning
[] clears it. An event table built from a vector of times
alone labels its events "Event 1" , "Event 2" and so
on and points this property at them, while one built from a timetable
leaves it empty, because nothing says which of that timetable&rsquo;s
variables holds labels.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Variable naming each event



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
eventtable.EventLengthsVariable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 407
eventtable: property EventLengthsVariable

Variable holding how long each event lasted

Variable holding how long each event lasted, given as the name of one
of the event table&rsquo;s own variables, or empty when the events are
instants. The variable holds a duration or a
calendarDuration . It cannot be set while
EventEndsVariable is set; an event states its extent as a
length or as an end, not as both.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Variable holding how long each event lasted



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
eventtable.RowTimes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 521
timetable: property RowTimes

Row times

Row times, specified as a datetime or duration vector
with one element for each row of the timetable. They are stored as a
column vector whatever shape they are given in. Unlike the row names
of a table they need not be unique, sorted or present: duplicate
times, a descending order and missing times are all accepted, and each
of them merely makes the timetable irregular. You can access them
with tt .Properties.RowTimes and assign them the same
way, which recomputes TimeStep .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
Row times



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
eventtable.SampleRate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 397
timetable: property SampleRate

Sampling rate in hertz

Sampling rate, specified as a positive numeric scalar, being the
reciprocal of TimeStep measured in seconds. It is
NaN whenever the time step is a calendarDuration ,
a calendar step having no fixed length in seconds, and whenever the
timetable is irregular. Assigning it regenerates the row times from
StartTime , as assigning TimeStep does.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Sampling rate in hertz



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
eventtable.StartTime


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 340
timetable: property StartTime

Time of the first row

Time of the first row, of the same type as RowTimes . It
follows the first row: deleting the first row leaves StartTime
naming the row that is now first. A timetable left with no rows keeps
the value it had. Assigning it shifts every row time by the same
amount and preserves TimeStep .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
Time of the first row



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
eventtable.TimeStep


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 803
timetable: property TimeStep

Spacing between row times

Spacing between consecutive row times, specified as a duration
or calendarDuration scalar, or a NaN duration when the
timetable is irregular. Two rows or more always imply a step of their
own and it is read off them afresh, so a subset with a gap in it steps
by nothing and a reversed one steps backwards. Fewer than two rows
imply nothing, and there it matters how the step was arrived at: one
given by 'TimeStep' or 'SampleRate' is remembered,
while one read off the row times is not and becomes NaN , its
class resetting to duration with it. A freshly built one-row
timetable has no step either way. A negative step is as regular as a
positive one. Assigning it regenerates the row times from
StartTime , even when the timetable was irregular.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Spacing between row times



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
eventtable.UserData


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 248
tabular: property UserData

Additional table information

Additional table information, specified as an array. Any type of data
can be attached using this property. You can access the UserData
property of a table tbl with tbl .Properties.UserData .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Additional table information



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
eventtable.VariableContinuity


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 940
tabular: property VariableContinuity

Variable continuity

Continuity of each variable, specified as a cell array of character
vectors or a string array carrying one element per variable, each of
them 'unset' , 'continuous' , 'step' or
'event' . It is empty by default, and assigning {} or
[] clears it. If specified as a string array, it is converted
and stored internally as a cell array of character vectors. You can
access it with tbl .Properties.VariableContinuity and you
can index individual variables to read or assign their continuity.

A table carries the property but does not act on it, which is
also how MATLAB behaves. A timetable uses it to choose the
default fill method of each variable when resampling.

MATLAB stores this property as a matlab.tabular.Continuity
enumeration. Octave has no enumeration classes, so it is stored and
returned here as a cell array of character vectors, as
VariableNames and VariableUnits are.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
Variable continuity



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
eventtable.VariableDescriptions


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 867
tabular: property VariableDescriptions

Variable descriptions

Variable descriptions, specified as a cell array of character vectors or
a string array. If specified as a string array, it is converted and
stored internally as a cell array of character vectors. If not empty
(default), it must contain the same number of elements as the number of
variables. If a specific variable does not have a description, this can
be specified with an individual empty character vector or an empty
string. You can access the VariableDescriptions property of a
table tbl with tbl .Properties.VariableDescriptions .
You can further index specific variables to access their description.
Assigning an empty cell or string array returns the property to its
default, and describing a single variable of a table that has no
descriptions gives the remaining variables an empty description.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
Variable descriptions



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
eventtable.VariableNames


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 555
tabular: property VariableNames

Variable names

Variable names, specified as a cell array of character vectors or a
string array. If specified as a string array, it is converted and stored
internally as a cell array of character vectors. All elements must be
nonempty and distinct, and their number must equal the number of
variables. You can access the data type of a specific variable by using
dot name assignment, as in tbl . varname , where
varname is the name of the variable in table tbl . If the
variable name does not exist, a new one is created.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
Variable names



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
eventtable.VariableTypes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 703
tabular: property VariableTypes

Variable data types

The class of the data of each variable, defined as a cell array of
character vectors or a string array with the same number of elements as
the number of variables in the table. If specified as a string array,
it is converted and stored internally as a cell array of character
vectors. You can access the VariableTypes property of a table
tbl with tbl .Properties.VariableTypes . You can
further index specific variables to access their data type. Modifying
the elements of the VariableTypes property automatically converts
the underlying data of the corresponding variable into the specified
data types provided that a valid conversion is requested.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
Variable data types



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
eventtable.VariableUnits


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 806
tabular: property VariableUnits

Variable units

Variable units, specified as a cell array of character vectors or a
string array. If specified as a string array, it is converted and stored
internally as a cell array of character vectors. If not empty (default),
it must contain the same number of elements as the number of variables.
If a specific variable does not have a unit, this can be specified with
an individual empty character vector or an empty string. You can access
the VariableUnits property of a table tbl with
tbl .Properties.VariableUnits . You can further index
specific variables to access their unit. Assigning an empty cell or
string array returns the property to its default, and giving a unit to
a single variable of a table that has none gives the remaining
variables an empty unit.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
Variable units



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
eventtable.empty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 500
eventtable: et = eventtable.empty ()
eventtable: et = eventtable.empty ( r , v )
eventtable: et = eventtable.empty ( sz )

Create an empty event table.

The arguments are those of timetable.empty , which this is in
every respect but the class of what comes back: a 0-by-0 event table
with no arguments, and otherwise one of r rows and v
variables, at least one of the two being zero. None of the three
event properties is set, there being no variable for one to name.

See also:
eventtable,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Create an empty event table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
eventtable.eventtable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1992
eventtable: et = eventtable ()
eventtable: et = eventtable ( eventTimes )
eventtable: et = eventtable ( tt )
eventtable: et = eventtable (&hellip;, Name , Value )

Create an event table.

et = eventtable () returns an empty event table with no
events and no variables.

et = eventtable ( eventTimes ) returns an event table
whose events happen at eventTimes , a datetime or
duration vector. With no labels given, the events are labelled
"Event 1" , "Event 2" and so on in a variable named
EventLabels , and EventLabelsVariable names it.

et = eventtable ( tt ) converts the timetable
tt , whose row times become the event times and whose variables
are kept as they are. No variable is guessed to be the labels, so
EventLabelsVariable is left empty unless
'EventLabelsVariable' says which one it is.

The following Name - Value options are supported:

Name Value
'EventLabels' A scalar or a vector with one element
per event, naming the events. It may be of any type other than
datetime , duration , calendarDuration ,
table and timetable . A scalar labels every event alike.
It is added as a variable named EventLabels .
'EventLengths' A duration or
calendarDuration , scalar or one element per event, saying how
long each event lasted. Only a duration is accepted when the
event times are durations. It is added as a variable named
EventLengths .
'EventEnds' A scalar or one element per event, of
the same type as the event times, saying when each event finished. It
is added as a variable named EventEnds .
'EventLabelsVariable' The name of a variable of
tt that names the events. Only with a timetable input.
'EventLengthsVariable' The name of a variable of
tt that holds the event lengths. Only with a timetable input.
'EventEndsVariable' The name of a variable of
tt that holds the event end times. Only with a timetable input.

A length and an end are mutually exclusive, however they are given,
and so are 'EventLabels' and 'EventLabelsVariable' .

See also:
timetable,
table2timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Create an event table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
findgroups


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1354
datatypes: G = findgroups ( A )
datatypes: G = findgroups ( A1 , &hellip;, AN )
datatypes: [ G , ID ] = findgroups ( A )
datatypes: [ G , ID1 , &hellip;, IDN ] = findgroups ( A1 , &hellip;, AN )

Find groups defined by one or more grouping variables.

G = findgroups ( A ) returns G , a column vector of
positive integer group numbers with one element per element of the grouping
variable A . The groups are the sorted unique values of A : if
N groups are found, every integer between 1 and N labels a group.
Elements of A that are missing ( NaN , NaT ,
<missing> , '' , or <undefined> ) are labelled NaN
in G . A can be a numeric, logical, string ,
cellstr , char , datetime , duration ,
calendarDuration , or categorical vector.

G = findgroups ( A1 , &hellip;, AN ) defines groups as
the sorted unique combinations of values across the grouping variables
A1 , &hellip;, AN , which must all have the same number of elements.

[ G , ID ] = findgroups ( A ) also returns ID , the
sorted unique values of A that identify each group. With multiple
grouping variables, [ G , ID1 , &hellip;, IDN ] =
findgroups ( A1 , &hellip;, AN ) returns one identifier vector per
grouping variable.

To group the variables of a table , call findgroups ( T ) ,
which dispatches to the table method and returns the group identifiers
as a table.

See also:
splitapply,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Find groups defined by one or more grouping variables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
groupcounts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1943
datatypes: B = groupcounts ( A )
datatypes: B = groupcounts ( A , groupbins )
datatypes: [ B , BG , BP ] = groupcounts (&hellip;)
datatypes: [&hellip;] = groupcounts (&hellip;, Name , Value )

Count the number of elements in each group of an array.

B = groupcounts ( A ) groups the rows of A by their
values and returns B , a column vector with the number of elements in
each group. A is a grouping vector, a matrix whose columns are
grouping variables, or a cell array of grouping vectors. Groups are the
sorted unique combinations of grouping values; rows holding a missing value
in a grouping variable form their own groups, sorted after the non-missing
groups.

[ B , BG , BP ] = groupcounts (&hellip;) also returns
BG , the grouping values that identify each group, and BP , a
column vector giving each group&rsquo;s count as a percentage of the total. When
A is a single grouping vector, BG holds its representative value
for each group; when several grouping variables are given, BG is a cell
array with one element per grouping variable.

The optional groupbins argument bins the grouping variables before
grouping (a vector of bin edges or a positive integer number of bins, applied
to a numeric, datetime, or duration grouping variable, or a cell array with
one scheme per grouping variable); each binned variable becomes a categorical
of bin interval labels.

The behaviour can be modified with the 'IncludeMissingGroups'
(default true ), 'IncludeEmptyGroups' (default false ),
and 'IncludedEdge' (default 'left' , the inclusive bin edge)
Name / Value pairs, as for the table method. When
'IncludeEmptyGroups' is true , the unused categories of a
categorical or binned grouping variable contribute empty groups.

To count the rows in each group of a table , call groupcounts
( T , groupvars , &hellip;) , which dispatches to the table
method and returns the result as a table.

See also:
groupsummary,
findgroups,
splitapply,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Count the number of elements in each group of an array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
groupfilter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1873
datatypes: B = groupfilter ( A , groupvars , method )
datatypes: B = groupfilter ( A , groupvars , groupbins , method )
datatypes: [ B , BG ] = groupfilter (&hellip;)

Filter the rows of an array by a per-group condition.

B = groupfilter ( A , groupvars , method ) groups
the rows of the array A by the grouping variables groupvars ,
applies the filter function method to each group, and returns B ,
the rows of A that satisfy the condition, in their original order.
groupvars is a grouping vector with one element per row of A , or
a cell array of such vectors. Rows holding a missing value in a grouping
variable form their own groups, to which method is applied like any
other group.

method is a function handle applied to each group&rsquo;s slice of every
column of A . It must return either a logical scalar, which keeps or
drops the whole group, or a logical vector with one element per row of the
group, which keeps or drops the individual rows. A row is kept only when the
condition holds for it across all columns of A .

[ B , BG ] = groupfilter (&hellip;) also returns BG , the
grouping values of the kept rows. When groupvars is a single grouping
vector, BG is a column vector with one element per kept row; when
several grouping variables are given, BG is a cell array with one
element per grouping variable.

The optional groupbins argument bins the grouping variables before
grouping (a vector of bin edges or a positive integer number of bins, or a
cell array with one scheme per grouping variable); see groupsummary
for details. The 'IncludedEdge' Name-Value pair ( 'left' by
default, or 'right' ) selects which bin edge is inclusive.

To filter the rows of a table , call groupfilter ( T ,
groupvars , &hellip;) , which dispatches to the table method and
returns the result as a table.

See also:
groupsummary,
groupcounts,
findgroups,
splitapply,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Filter the rows of an array by a per-group condition.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
groupsummary


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2458
datatypes: B = groupsummary ( A , groupvars , method )
datatypes: B = groupsummary ( A , groupvars , groupbins , method )
datatypes: [ B , BG , BC ] = groupsummary (&hellip;)

Compute summary statistics by group for an array.

B = groupsummary ( A , groupvars , method ) groups
the rows of the array A by the grouping variables groupvars and
applies method to each column of A within each group, returning
the results in B , which has one row per group. groupvars is a
grouping vector with one element per row of A , or a cell array of such
vectors. Groups are the sorted unique combinations of grouping values; rows
holding a missing value in a grouping variable form their own groups, sorted
after the non-missing groups.

method is one of the names 'sum' , 'mean' ,
'median' , 'mode' , 'var' , 'std' ,
'min' , 'max' , 'range' , 'nnz' ,
'nummissing' , or 'numunique' , a function handle, or a cell
array of method names andor function handles. NaN values are
omitted for every named method except 'nummissing' ; a function handle
receives the values with NaN included and must return a single row.
When several methods are requested the columns of B are ordered by
column of A first, then by method.

[ B , BG , BC ] = groupsummary (&hellip;) also returns
BG , the grouping values that identify each group, and BC , a
column vector with the number of rows in each group. When groupvars is
a single grouping vector, BG holds its representative value for each
group; when several grouping variables are given, BG is a cell array
with one element per grouping variable.

The optional groupbins argument bins the grouping variables before
grouping: a vector of bin edges or a positive integer number of equal-width
bins, applied to a numeric, datetime, or duration grouping variable, or a
cell array with one scheme per grouping variable. Each binned variable
becomes a categorical of bin interval labels.

The behaviour can be modified with the 'IncludeMissingGroups'
(default true ), 'IncludeEmptyGroups' (default false ),
and 'IncludedEdge' (default 'left' , the inclusive bin edge)
Name / Value pairs, as for the table method. When
'IncludeEmptyGroups' is true , the unused categories of a
categorical or binned grouping variable contribute empty groups.

To summarise the variables of a table , call groupsummary
( T , groupvars , &hellip;) , which dispatches to the table
method and returns the result as a table.

See also:
findgroups,
splitapply,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Compute summary statistics by group for an array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
grouptransform


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2464
datatypes: B = grouptransform ( A , groupvars , method )
datatypes: B = grouptransform ( A , groupvars , groupbins , method )
datatypes: [ B , BG ] = grouptransform (&hellip;)
datatypes: [&hellip;] = grouptransform (&hellip;, Name , Value )

Transform the columns of an array group by group.

B = grouptransform ( A , groupvars , method )
groups the rows of the array A by the grouping variables
groupvars , applies method to each column of A within each
group, and returns B , the transformed values, one row per row of
A and in the original order. groupvars is a grouping vector with
one element per row of A , or a cell array of such vectors. Rows
holding a missing value in a grouping variable form their own groups, which
are transformed like any other group.

method is one of the names 'zscore' , 'norm' ,
'meancenter' , 'rescale' , 'meanfill' ,
'linearfill' , or a function handle. 'zscore' centers and
scales each group to zero mean and unit standard deviation; 'norm'
divides by the group 2-norm; 'meancenter' subtracts the group mean;
'rescale' rescales to the range [0, 1] ; 'meanfill'
replaces missing values with the group mean; and 'linearfill' fills
missing values by linear interpolation within the group (leaving leading and
trailing missing values unchanged). For the named methods NaN values
are omitted when computing the group statistics. A function handle is
applied to each group&rsquo;s column slice and must return either a single row
(broadcast) or one row per row of the group.

[ B , BG ] = grouptransform (&hellip;) also returns BG ,
the grouping values of each row. When groupvars is a single grouping
vector, BG is that vector; when several grouping variables are given,
BG is a cell array with one element per grouping variable.

The 'ReplaceValues' Name / Value pair (default true )
controls whether the transformed values replace the columns of A or,
when false , are appended to them. The optional groupbins
argument bins the grouping variables before grouping (a vector of bin edges
or a positive integer number of bins, or a cell array with one scheme per
grouping variable); see groupsummary for details. The
'IncludedEdge' pair ( 'left' by default, or 'right' )
selects the inclusive bin edge.

To transform the variables of a table , call grouptransform
( T , groupvars , &hellip;) , which dispatches to the table
method and returns the result as a table.

See also:
groupsummary,
groupfilter,
findgroups,
splitapply,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Transform the columns of an array group by group.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
histcounts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2355
datatypes: N = histcounts ( X )
datatypes: N = histcounts ( X , nbins )
datatypes: N = histcounts ( X , edges )
datatypes: N = histcounts (&hellip;, Name , Value )
datatypes: [ N , edges ] = histcounts (&hellip;)
datatypes: [ N , edges , bin ] = histcounts (&hellip;)

Histogram bin counts.

N = histcounts ( X ) partitions the values of X into
bins chosen automatically and returns the number of elements in each bin as a
row vector. X is treated as X (:) regardless of its shape,
and NaN and infinite values are excluded.

N = histcounts ( X , nbins ) uses nbins bins, and
N = histcounts ( X , edges ) uses the bin edges given
in the monotonically non-decreasing vector edges . Bin j covers
[ edges (j), edges (j+1)) , except the last bin, which is
closed at both ends.

[ N , edges , bin ] = histcounts (&hellip;) also returns
the bin edges and, in bin , the index of the bin each element of X
belongs to. bin has the same size as X and holds 0 for
elements that fall in no bin. Note this differs from discretize ,
which returns NaN for such elements.

The following Name , Value pairs are supported. When more than
one of 'NumBins' , 'BinWidth' , 'BinEdges' and
'BinMethod' is given, the last one specified takes effect.

Name Value
'NumBins' A positive integer scalar giving the number of
bins, equivalent to the nbins syntax.
'BinEdges' A vector of bin edges, equivalent to the
edges syntax.
'BinWidth' A positive finite scalar giving a uniform bin
width. The edges are placed at multiples of the width covering the data.
'BinLimits' A two-element vector [ lo ,
hi ] restricting the binning to that range. Values outside it are not
counted, and the outermost edges are clamped to lo and hi .
'BinMethod' One of 'auto' (default),
'scott' , 'fd' , 'integers' , 'sturges' or
'sqrt' . 'auto' uses the 'integers' rule when the
data are integer-valued and span at most 50, and 'scott'
otherwise.
'Normalization' One of 'count' (default),
'countdensity' , 'cumcount' , 'probability' ,
'percentage' , 'pdf' or 'cdf' . The divisor for
'probability' , 'percentage' , 'pdf' and 'cdf'
is numel ( X ) , not the number of elements actually counted, so
values excluded by being NaN or out of range still contribute to it.

MATLAB accepts 'percentage' but omits it from the list of valid
values in its own error message; it is documented here.

See also:
discretize


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
Histogram bin counts.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
hours


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 391
datatypes: D = hours ( X )

Fixed-time duration in hours.

D = hours ( X ) returns a duration array
representing fixed-time duration hours equivalent to the values in X ,
which must be a numeric array.

hours is also available as a method for duration arrays, in
which case it performs the opposite conversion.

See also:
duration,
years,
days,
minutes,
seconds,
milliseconds,
duration.hours


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Fixed-time duration in hours.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
iscalendarduration


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 197
datatypes: TF = iscalendarduration ( X )

True if input is a calendarDuration array, false otherwise.

TF = iscalendarduration ( X ) always returns a logical
scalar, irrespective of the size of X .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
True if input is a calendarDuration array, false otherwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
iscategorical


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 182
datatypes: TF = iscategorical ( X )

True if input is a categorical array, false otherwise.

TF = iscategorical ( X ) always returns a logical scalar,
irrespective of the size of X .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
True if input is a categorical array, false otherwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
isdatetime


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 173
datatypes: TF = isdatetime ( X )

True if input is a datetime array, false otherwise.

TF = isdatetime ( X ) always returns a logical scalar,
irrespective of the size of X .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
True if input is a datetime array, false otherwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
isduration


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 173
datatypes: TF = isduration ( X )

True if input is a duration array, false otherwise.

TF = isduration ( X ) always returns a logical scalar,
irrespective of the size of X .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
True if input is a duration array, false otherwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
isnat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 346
datatypes: TF = isnat ( T )

Test for Not-A-Time elements in datetime array.

TF = isnat ( T ) returns a logical array TF of the
same size as T containing true for each corresponding
element of T that is Not-A-Time ( NaT ) and false
otherwise. NaT is the equivalent of NaN in numeric
arrays.

If T is not a datetime array, isnat returns an error.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Test for Not-A-Time elements in datetime array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
istable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 159
datatypes: TF = istable ( X )

True if input is a table , false otherwise.

TF = istable ( X ) always returns a logical scalar,
irrespective of the size of X .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
True if input is a table, false otherwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
istabular


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 400
datatypes: TF = istabular ( X )

True if input is a table or a timetable , false otherwise.

TF = istabular ( X ) always returns a logical scalar,
irrespective of the size of X . It is true for every class of
tabular data, whereas istable and istimetable each single
one of them out. A timetable is not a table and neither is
a subclass of the other.

See also:
istable,
istimetable,
table,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
True if input is a table or a timetable, false otherwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
istimetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 302
datatypes: TF = istimetable ( X )

True if input is a timetable , false otherwise.

TF = istimetable ( X ) always returns a logical scalar,
irrespective of the size of X . It is false for a table ,
which is not a timetable and is not a superclass of one.

See also:
istable,
istabular,
timetable,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
True if input is a timetable, false otherwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
keyHash


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2098
datatypes: key = keyHash ( X )
datatypes: key = keyHash ( X , base )

Generate a hash code for an array.

key = keyHash ( X ) generates a uint64 scalar that
represents the input X , which may be a numeric, logical, character,
cell, struct or function handle array. keyHash utilizes the 64-bit
FNV-1a variant of the Fowler-Noll-Vo non-cryptographic hash function.

A cell array is keyed on its elements, each hashed in turn, so a
cell may hold any type that keyHash accepts, nested to any depth. A
struct is keyed on its field names and their values; the order in
which its fields were created is not part of the key, so two structs
differing only in field order are the same key. A function handle is keyed
on its text alone: two named handles for the same function are one key,
while distinct anonymous handles never match even when written identically,
so nothing a handle captures can be observed through keyMatch .

key = keyHash ( X , base ) also generates a 64-bit
hash code using base as the offset basis for the FNV-1a hash
algorithm. base must be a uint64 integer type scalar. Use
this syntax to cascade keyHash on multiple objects for which a
single hash code is required.

keyMatch decides key identity and keyHash agrees with it: two
values that keyMatch reports as the same key always have the same
hash code. The converse does not hold, since distinct keys are permitted
to share a hash code. Values that differ only in a representation that
keyMatch ignores therefore hash alike, so -0 hashes as
0 , and every NaN hashes alike whatever produced it.

Elements of a cell array of character vectors are hashed together with
their lengths, so that the boundaries between them are part of the key and
{'ab', 'c'} does not hash as {'a', 'bc'} .

Note that unlike MATLAB, this implementation does not use any random seed.
As a result, keyHash will always generate the exact same hash key
for any particular input across different workers and Octave sessions.
Hash codes are not stable across package versions, however: those
produced before version 1.3.1 are invalid and must be recomputed.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Generate a hash code for an array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
keyMatch


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1058
datatypes: TF = keyMatch ( A , B )

Return true if both inputs are the same key.

TF = keyMatch ( A , B ) returns a logical scalar,
which is true , if the inputs A and B are the same key,
and false otherwise. Two values are the same key when they have
the same class, the same size, and equal contents, with missing values
comparing equal to one another as in isequaln . Neither class nor
size is promoted, so 1 and int8 (1) are different keys, and
so are a row and a column holding the same elements.

keyMatch decides key identity and keyHash agrees with it:
two values that keyMatch reports as the same key always have the
same hash code. The converse does not hold, since distinct keys are
permitted to share a hash code, and so comparing hash codes is not a
substitute for calling keyMatch .

Both inputs must be of a type that can be a key, that is, one that
keyHash can hash; anything else raises an error. Answering for a
value that cannot be hashed would assert that two values are the same key,
or are different keys, when no key exists for either.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Return true if both inputs are the same key.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
milliseconds


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 426
datatypes: D = milliseconds ( X )

Fixed-time duration in milliseconds.

D = milliseconds ( X ) returns a duration array
representing fixed-time duration milliseconds equivalent to the values in
X , which must be a numeric array.

milliseconds is also available as a method for duration
arrays, in which case it performs the opposite conversion.

See also:
duration,
years,
days,
hours,
minutes,
seconds,
duration.milliseconds


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Fixed-time duration in milliseconds.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
minutes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 401
datatypes: D = minutes ( X )

Fixed-time duration in minutes.

D = minutes ( X ) returns a duration array
representing fixed-time duration minutes equivalent to the values in X ,
which must be a numeric array.

minutes is also available as a method for duration arrays, in
which case it performs the opposite conversion.

See also:
duration,
years,
days,
hours,
seconds,
milliseconds,
duration.minutes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Fixed-time duration in minutes.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
missing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 108
datatypes: missing

Array of missing values.

A special class to represent missing data to other data types.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
Array of missing values.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
missing.eq


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 520
missing: TF = eq ( A , B )

Equality for missing arrays.

TF = eq ( A , B ) is the equivalent of the syntax
TF = A == B and returns a logical array of the
same size as the largest input with its elements set to false .
A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1.

One of the input arguments may also be any type of array. Any comparison
with missing arrays always returns false .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Equality for missing arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
missing.ge


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 536
missing: TF = ge ( A , B )

Greater than or equal to for missing arrays.

TF = ge ( A , B ) is the equivalent of the syntax
TF = A >= B and returns a logical array of the
same size as the largest input with its elements set to false .
A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1.

One of the input arguments may also be any type of array. Any comparison
with missing arrays always returns false .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Greater than or equal to for missing arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
missing.gt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 523
missing: TF = gt ( A , B )

Greater than for missing arrays.

TF = gt ( A , B ) is the equivalent of the syntax
TF = A > B and returns a logical array of the
same size as the largest input with its elements set to false .
A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1.

One of the input arguments may also be any type of array. Any comparison
with missing arrays always returns false .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Greater than for missing arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
missing.iscolumn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 297
missing: TF = iscolumn ( M )

Return true if missing array is a column vector.

TF = iscolumn ( M ) returns a logical scalar TF ,
which is true if the missing array M is a column vector
and false otherwise. A column vector is a 2-D array for which
size ( X ) returns [ N , 1] with non-negative
N .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Return true if missing array is a column vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
missing.isempty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 184
missing: TF = isempty ( M )

Return true if missing array is empty.

TF = isempty ( M ) returns a logical scalar TF ,
which is true if the missing array M is empty and
false otherwise.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Return true if missing array is empty.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
missing.ismatrix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 322
missing: TF = ismatrix ( M )

Return true if missing array is a 2-D array.

TF = ismatrix ( M ) returns a logical scalar TF ,
which is true if the missing array M is a matrix and
false otherwise. A matrix is an array of any type where
ndims ( X ) == 2 and for which size ( X ) returns
[ H , W ] with non-negative H and W .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Return true if missing array is a 2-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
missing.ismissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 183
missing: out = ismissing ( M )

Return true for each element in missing array.

TF = ismissing ( M ) returns a logical array TF
of the same size as M containing true in every element.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Return true for each element in missing array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
missing.isrow


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 281
missing: TF = isrow ( M )

Return true if missing array is a row vector.

TF = isrow ( M ) returns a logical scalar TF ,
which is true if the missing array M is a row vector
and false otherwise. A row vector is a 2-D array for which
size ( X ) returns [1, N ] with non-negative
N .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Return true if missing array is a row vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
missing.isscalar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 271
missing: TF = isscalar ( M )

Return true if missing array is a scalar.

TF = isscalar ( M ) returns a logical scalar TF ,
which is true if the missing array M is also a scalar
and false otherwise. A scalar is a single element object for
which size ( X ) returns [1, 1] .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Return true if missing array is a scalar.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
missing.isvector


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 338
missing: TF = isvector ( M )

Return true if missing array is a vector.

TF = isvector ( M ) returns a logical scalar TF ,
which is true if the missing array M is a vector and
false otherwise. A vector is a 2-D array for which one of the
dimensions is equal to 1 (either 1&times;N or N&times;1 ). By
definition, a scalar is also a vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Return true if missing array is a vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
missing.le


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 533
missing: TF = le ( A , B )

Less than or equal to for missing arrays.

TF = le ( A , B ) is the equivalent of the syntax
TF = A <= B and returns a logical array of the
same size as the largest input with its elements set to false .
A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1.

One of the input arguments may also be any type of array. Any comparison
with missing arrays always returns false .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Less than or equal to for missing arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
missing.lt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 520
missing: TF = lt ( A , B )

Less than for missing arrays.

TF = lt ( A , B ) is the equivalent of the syntax
TF = A < B and returns a logical array of the
same size as the largest input with its elements set to false .
A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1.

One of the input arguments may also be any type of array. Any comparison
with missing arrays always returns false .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Less than for missing arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
missing.missing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 181
missing: M = missing ()

Create missing values.

missing always returns a scalar missing value. Use repmat
to expand a scalar missing value to a missing array of desired
dimensions.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Create missing values.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
missing.ndims


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 145
missing: out = ndims ( M )

Number of dimensions in a missing array.

out = ndims ( M ) returns the number of dimensions of
the missing array M .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Number of dimensions in a missing array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
missing.ne


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 521
missing: TF = ne ( A , B )

Not equal for missing arrays.

TF = ne ( A , B ) is the equivalent of the syntax
TF = A != B and returns a logical array of the
same size as the largest input with its elements set to false .
A and B must be size compatible, which translates to they can
be the same size, one can be scalar, or for every dimension, their
dimension sizes must be equal or one of them must be 1.

One of the input arguments may also be any type of array. Any comparison
with missing arrays always returns false .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Not equal for missing arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
missing.numel


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 147
missing: out = numel ( M )

Total number of elements in a missing array.

out = numel ( M ) returns the number of elements in the
missing array M .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Total number of elements in a missing array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
missing.size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 774
missing: sz = size ( M )
missing: dim_sz = size ( M , dim )
missing: dim_sz = size ( M , d1 , d2 , &hellip;)
missing: [ rows , columns , &hellip;, dim_n_sz ] = size (&hellip;)

Return the size of a missing array.

sz = size ( M ) returns a row vector with the size
(number of elements) of each dimension for the missing array M .

dim_sz = size ( M , dim ) returns the size of
the corresponding dimension specified in dim . If dim is a
vector, then dim_sz is a vector of the same length and with each
element corresponding to a specified dimension. Multiple dimensions may
also be specified as separate arguments.

With a single output argument, size returns a row vector. When
called with multiple output arguments, size returns the size of
dimension N in the Nth argument.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Return the size of a missing array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
ods2struct


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1257
datatypes: s = ods2struct ( filename )

Read every sheet of an OpenDocument spreadsheet into a scalar structure.

s = ods2struct ( filename ) reads each data sheet of the
OpenDocument spreadsheet named by filename into a table and
returns a scalar structure with one field per sheet, in sheet order. A
sheet written from a timetable is tagged as such and comes back as
one, so a workbook of both round-trips through struct2ods .

A sheet named as another sheet&rsquo;s event table is consumed : it is
attached to the timetable that names it and gets no field of its own, since
returning the same event table twice would leave an edit to one copy
disagreeing with the other on the rewrite. Both
the compressed .ods and the flat .fods formats are read.
Each sheet is reconstructed exactly as by ods2table ; it is the inverse
of struct2ods .

A sheet name that is not a valid structure field name is canonicalised with
matlab.lang.makeValidName (and made unique if two sheet names
collide). Whenever the field name differs from the sheet name, the original
sheet name is stored on that field&rsquo;s table as the 'ActualSheetName'
custom property, so a subsequent struct2ods restores the exact sheet
name.

See also:
struct2ods,
ods2table,
table2ods,
readtable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
Read every sheet of an OpenDocument spreadsheet into a scalar structure.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
ods2table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3609
datatypes: tbl = ods2table ( filename )
datatypes: tbl = ods2table ( filename , 'Sheet' , sheet )
datatypes: [ tbl , rowTimesName ] = ods2table (&hellip;)

Read an OpenDocument spreadsheet file into a table.

tbl = ods2table ( filename ) reads the OpenDocument
spreadsheet named by filename , which may be a character vector, a
cellstr, or a string scalar, and returns it as a table . Both the
compressed .ods and the flat .fods formats are read; the
format is detected from the file contents, not its extension.

The following Name - Value options are supported:

Name Value
'Sheet' The sheet to read, selected by its name (a
character vector or string scalar) or by a 1-based index over the data
sheets. The default is the first data sheet.
'ReadVariableNames' A logical scalar specifying whether
the variable names are taken from the file (default true ). Setting
it false numbers the variables Var1 , Var2 , and so on.
'ReadRowNames' A logical scalar specifying whether the
table takes row names from the file (default true ). Setting it
false leaves the table without row names.
'VariableNamesRow' A nonnegative integer scalar naming the
row of the sheet that holds the variable names (default 1 ). Zero is
equivalent to setting 'ReadVariableNames' to false . It
applies only to a sheet with no metadata; a sheet written by
table2ods records the names, so there is no row to name.
'RowNamesColumn' A nonnegative integer scalar naming the
column of the sheet that holds the row names (default 0 ). Zero is
equivalent to setting 'ReadRowNames' to false . It applies
only to a sheet with no metadata, which says nothing about which column holds
row names; a sheet written by table2ods records the column. A leading
column headed Row , which is what writetable writes for the row
names, is taken as the row names without being named here.

When the file carries the hidden __datatypes_meta__ sheet written by
the table2ods method, the variable types, descriptions and units are
restored from it and the variable names from the rows heading the data
sheet, and date and time cells are
reconstructed as datetime and duration arrays. Integers are
restored without loss of precision and missing cells become NaN ,
NaT , or missing strings as appropriate. A file written before the
names moved to the data sheet carries them on the metadata sheet, and is
read just as well.

A sheet written from a timetable tags its leading column as row times. A
table has no row times, so the column is returned as an ordinary leading
variable under the row dimension name, and the second output
rowTimesName names it; rowTimesName is empty for every other
sheet, which is how ods2struct tells a sheet that held a timetable
from one whose first variable merely happens to be a datetime . Read
such a sheet with ods2timetable to get the timetable back.

When the metadata sheet is absent (a spreadsheet written by another
application) the variable types are inferred from the cell value types.
Where no names are available the variables are numbered, and the columns can
then no longer be grouped, so a multicolumn variable comes back as separate
variables and a nested table as flat columns.

A datetime or duration variable is restored exactly, along
with its Format and, for a zone-aware datetime , its
TimeZone . A cell that carries no value at all is a missing entry,
which is not the same as a cell holding an empty string. The following
round-trip limitation applies, mirroring csv2table :
calendarDuration and categorical variables are returned as cell
arrays of character vectors and their values are not reconstructed.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Read an OpenDocument spreadsheet file into a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
ods2timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2385
datatypes: tt = ods2timetable ( filename )
datatypes: tt = ods2timetable ( filename , Name , Value )

Read an OpenDocument spreadsheet file into a timetable.

tt = ods2timetable ( filename ) reads a sheet of the
OpenDocument spreadsheet named by filename into a timetable .
filename may be a character vector, a cellstr, or a string scalar.

A sheet written by timetable2ods carries the package&rsquo;s own metadata,
which names and types every variable and tags the leading column of row
times with their type, their TimeZone where they have one, and their
Format . Such a sheet comes back as the timetable it was written
from: the row times keep their type, zone and format exactly, and the row
dimension keeps its name.

Any other sheet is read as ods2table reads it, and its first
datetime or duration variable becomes the row times, the row
dimension taking that variable&rsquo;s name. A sheet with no such variable cannot
be read as a timetable.

Every Name - Value option of ods2table is accepted and
behaves as it does there, with two exceptions. 'ReadRowNames' and
'RowNamesColumn' are refused: a timetable labels its rows by time
and by nothing else, so a sheet whose rows are named is read with
ods2table .

TimeStep and SampleRate are not stored in the file and are
worked out again from the row times, so a regular timetable comes back
regular.

An event table is held on a sheet of its own, named by a
## Events crossref: line in the hidden metadata sheet, and is
attached to the timetable that names it. With no 'Sheet' given the
first data sheet is read less the sheets that hold somebody&rsquo;s
events , so a file holding one timetable and its events reads with no
argument at all. A sheet asked for by name or by index is read whichever it
is, the index running over every data sheet so that one number means one
sheet here and in ods2table alike; an event sheet asked for by name
comes back as the eventtable it is.

A reference is refused when it names a sheet the file does not have, when
the sheet it names holds no row times, when those row times are of a
different type than the referring timetable&rsquo;s, or when the sheet it names
carries a reference of its own, an event table not being something that can
carry an event table. All four are reachable only in a file edited by hand.

See also:
timetable2ods,
ods2table,
ods2struct,
csv2timetable,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Read an OpenDocument spreadsheet file into a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
parsePairedArguments


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1619
datatypes: [ optarg_1 , &hellip;, optarg_N ] = parsePairedArguments ( optarg_names , default_values , arg_list )
datatypes: [ optarg_1 , &hellip;, optarg_N , rem_args ] = parsePairedArguments ( optarg_names , default_values , arg_list )

Parse optional paired arguments from variable argument list.

parsePairedArguments parses the optional paired arguments specified
by optarg_names from the variable input argument list, arg_list .
Any optarg_names that are not found in arg_list are returned with
their default value specified by default_values , which must be a cell
array with the same number of elements as optarg_names .

optarg_names must be a cell array of character vectors or a string
array with the same number of elements as the number of output arguments
specified as [ optarg_1 , &hellip;, optarg_N ] , while an extra
output argument, rem_args , may be specified for the remaining input
arguments in arg_list that were not specified by optarg_names .

Each property name specified by optarg_names is case insensitive.

A property specified more than once in arg_list takes the value of its
last occurrence, as in MATLAB. Every occurrence is consumed, so none of them
is returned in rem_args .

The following example illustrates how to use parsePairedArguments
inside a function to parse optional paired arguments for three properties,
namely 'A' , 'B' , and 'C' .

## Declare optional property Names and their default Values
optNames = {'A', 'B', 'C'};
dfValues = {1, 2, 3};

## Parse optional Name-Value paired arguments
[var_A, var_B, var_C, args] = ...
parsePairedArguments (optNames, dfValues, args);


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 186
parsePairedArguments (optarg_names, default_values, arg_list) @deftypefnx {datatypes} {[optarg_1, , optarg_N, rem_args] =} @ parsePairedArguments (optarg_names, default_values, arg_list)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
readtable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2650
datatypes: tbl = readtable ( filename )
datatypes: tbl = readtable ( filename , Name , Value )

Read a file into a table, detecting variable types automatically.

tbl = readtable ( filename ) reads the file named by
filename (a character vector or string scalar) and returns it as a
table . The file type is inferred from the extension:
.txt , .csv , and .dat are read as delimited text;
.ods and .fods are read as OpenDocument spreadsheets. Use
the 'FileType' option to override the inferred type.

By default the first row supplies the variable names and each column&rsquo;s data
type is detected automatically (numeric, datetime , duration , or
text). The following Name - Value options are supported:

Name Value
'FileType' 'text' or 'spreadsheet' .
'ReadVariableNames' Logical; read the first row as
variable names (default true ).
'ReadRowNames' Logical; read the first column as row names
(default false ).
'Delimiter' Field delimiter for text files: a single
character or one of 'comma' , 'space' , 'tab' ,
'semi' , 'bar' (default ',' ).
'NumHeaderLines' Number of lines to skip before the header
(default 0 ).
'TextType' 'char' or 'string' for text
columns (default 'char' ).
'VariableNamingRule' 'modify' or
'preserve' (default 'modify' ).
'Sheet' Spreadsheet only: the sheet to read, selected by
name or by a 1-based index over the data sheets (default: the first sheet).
'Range' Spreadsheet only: an A1-style range such as
'C5' or 'C5:D8' limiting the region read.
'VariableNamesRow' A nonnegative integer naming the line
or row that holds the variable names (default 1 ). Zero is
equivalent to 'ReadVariableNames' , false .
'VariableNamesLine' MATLAB&rsquo;s spelling of
'VariableNamesRow' for a text file, and an exact alias of it.
Passing both names raises an error rather than one silently winning.
'RowNamesColumn' A nonnegative integer naming the column
that holds the row names (default 1 ), used when
'ReadRowNames' is true . Zero is equivalent to
'ReadRowNames' , false .

An OpenDocument file written by table2ods carries the package&rsquo;s own
metadata, which names and types every variable exactly and leaves the data
sheet without a header row. Such a file is read by ods2table , so it
comes back whole rather than being read positionally, which would take its
first row of data for the variable names. An explicit 'Range' asks
for a block of the sheet instead and is read positionally as usual.

Office Open XML spreadsheets ( .xlsx , .xlsm ) are read via the
same interface as ODS. The legacy binary formats .xls and
.xlsb are not supported; use .xlsx , .ods , or a text
format.

See also:
writetable,
csv2table,
ods2table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Read a file into a table, detecting variable types automatically.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
readtimetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1791
datatypes: tt = readtimetable ( filename )
datatypes: tt = readtimetable ( filename , Name , Value )

Read a file into a timetable, in the MATLAB-compatible form.

tt = readtimetable ( filename ) reads filename as
readtable reads it, taking the file to carry a header row of names and
then one row per row, and turns the result into a timetable . Text
files ( .txt , .csv , .dat ) and spreadsheets
( .ods , .fods , .xlsx , .xlsm ) are supported,
and 'FileType' overrides what the extension says.

The first datetime or duration variable becomes the
row times and the row dimension takes its name, which is what MATLAB does and
what makes a file written by writetimetable come back as it went out.
'RowTimes' names a different variable, by name or by index. A file
with no such variable cannot be read as a timetable.

A column written in the RFC 9557 form,
2024-03-09T22:00:00-05:00[America/New_York] , is recognised and comes
back as a zone-aware datetime with its zone and its side of any
daylight-saving fold intact. That is what writetimetable writes for
zoned row times; see deviation D7 in that method&rsquo;s help for why.
A column MATLAB wrote is read as MATLAB reads it, so a bare wall clock comes
back unzoned, exactly as it does there.

Every Name - Value option of readtable is accepted and
behaves as it does there, with two exceptions. 'ReadRowNames' and
'RowNamesColumn' are refused: a timetable labels its rows by time and
by nothing else, so a file whose rows are named is read with
readtable .

TimeStep and SampleRate are not stored in the file and are
worked out again from the row times. No file MATLAB can read carries an
event table, so the result never has one; use ods2timetable for that.

See also:
writetimetable,
readtable,
ods2timetable,
csv2timetable,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
Read a file into a timetable, in the MATLAB-compatible form.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
rowfilter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 705
datatypes: rowfilter

Subscript into a table or timetable by a condition on its variables.

A utility class that builds a condition out of comparisons written
against variable names, and selects the rows satisfying it. The
condition is written before the rows are looked at, so the same filter
may be used on any table naming the same variables.

rf = rowfilter (tbl);
tbl(rf.Height > 180 & rf.Age < 40, :)

A filter of this package is a rowfilter , a class of its own beside
vartype , timerange and withtol , where MATLAB&rsquo;s is a
matlab.io.RowFilter . Only the class name differs: nothing here
calls itself matlab.* , and no behaviour follows from it.

See also:
timerange,
withtol,
table,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Subscript into a table or timetable by a condition on its variables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
rowfilter.rowIndices


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 100
rowfilter: ix = rowIndices ( rf , tbl )

Return the positions of the rows of tbl the filter selects.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
Return the positions of the rows of tbl the filter selects.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
rowfilter.rowfilter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 694
rowfilter: rf = rowfilter ( tbl )
rowfilter: rf = rowfilter ( varNames )

Create a row filter.

rf = rowfilter ( tbl ) creates a filter that may be
written against the variables of tbl , a table or a timetable.
For a timetable the row times may be filtered on too, under the name
of the row dimension.

rf = rowfilter ( varNames ) creates one against the
named variables without a table to take them from, so that a filter
may be written before the data it will be applied to exists.

A filter carries no condition until one is written against it, and a
condition is a comparison of a variable with a value, optionally
combined with & , | and ~ .

See also:
timerange,
withtol,
table,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
Create a row filter.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
seconds


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 401
datatypes: D = seconds ( X )

Fixed-time duration in seconds.

D = seconds ( X ) returns a duration array
representing fixed-time duration seconds equivalent to the values in X ,
which must be a numeric array.

seconds is also available as a method for duration arrays, in
which case it performs the opposite conversion.

See also:
duration,
years,
days,
hours,
minutes,
milliseconds,
duration.seconds


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Fixed-time duration in seconds.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
splitapply


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1108
datatypes: Y = splitapply ( func , X , G )
datatypes: Y = splitapply ( func , X1 , &hellip;, XN , G )
datatypes: [ Y1 , &hellip;, YM ] = splitapply (&hellip;)

Split data into groups and apply a function to each group.

Y = splitapply ( func , X , G ) splits the data
variable X into groups according to the group numbers G
(typically produced by findgroups ), applies the function handle
func to each group, and concatenates the per-group results into the
output Y . G must be a vector of positive integers with one
element per element of X ; if it identifies N groups, every
integer between 1 and N must occur at least once. Elements for which
G is NaN are omitted.

Y = splitapply ( func , X1 , &hellip;, XN ,
G ) splits each of the data variables X1 , &hellip;, XN and
passes the corresponding group of each as a separate input argument to
func .

[ Y1 , &hellip;, YM ] = splitapply (&hellip;) returns the
multiple outputs of func , each concatenated across groups.

To split the variables of a table , call
splitapply ( func , T , G ) , which dispatches to the
table method.

See also:
findgroups,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Split data into groups and apply a function to each group.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
string


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 753
datatypes: string

Array representing sequences of characters.

A string array is an array, where each element stores a sequence of
characters of arbitrary length.

A string array can also have missing elements, which differ from a sequence
of characters of zero length (the equivalent of an empty character vector).

To enable existing functions to handle string arrays as if they were cell
arrays of character vectors or character arrays, use the
convertCharsToStrings function inside your code. To enable
functions working with string arrays to accept cell arrays of character
vectors or character vectors as if they were string arrays or string
scalars, use the convertStringsToChars function.

See also:
convertCharsToStrings,
convertStringsToChars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Array representing sequences of characters.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
string.append


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 525
string: newstr = append ( str1 , &hellip;, strN )

Combine string arrays.

newstr = append ( str1 , &hellip;, strN ) combines
the text from each input argument, str1 , &hellip;, strN ),
which must be either string arrays, cell arrays of character vectors, or
character vectors or matrices. All input arguments must be of compatible
sizes. Character vectors are treated as a single text element and
character matrices are treated as a column of elements. append
preserves any trailing white spaces, unlike the strcat function.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Combine string arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
string.cat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 398
string: C = cat ( dim , A , B , &hellip;)

Concatenate string arrays.

C = cat ( dim , A , B , &hellip;) concatenates
string arrays A , B , &hellip; along dimension dim . All
input arrays must have the same size except along the operating dimension
dim . Any of the input arrays may also be character matrixes, cell
arrays of character vectors, numeric arrays, or logical arrays of
compatible size.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Concatenate string arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
string.cell


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 474
string: c_arr = cell ( str )

Convert string array to a cell array.

c_arr = cell ( str ) returns a cell array, c_arr ,
which has the same size as the input string str . All elements in
str that represent real or complex numbers are converted to
equivalent double values, whereas all other non-missing elements are
converted to character vectors. Zero-length strings are converted to
'' empty character vectors, while missing values are returned as
[] empty numeric vectors.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Convert string array to a cell array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.cellstr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 293
string: cstr = cellstr ( str )

Convert string array to a cell array of character vectors.

cstr = cellstr ( str ) returns a cell array of
character vectors, cstr , which has the same size as the input
string str . Both empty strings and missing values are returned as
empty character vectors.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Convert string array to a cell array of character vectors.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
string.char


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 269
string: c_mat = char ( str )

Convert string array to a character matrix.

c_mat = char ( str ) returns a character matrix,
c_mat , which contains as many rows as the elements of the string.
Both empty strings and missing values are returned as empty character
vectors.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Convert string array to a character matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
string.circshift


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 733
string: B = circshift ( A , n )
string: B = circshift ( A , n , dim )

Circularly shift the elements in a string array.

B = circshift ( A , n ) circularly shifts the
elements of the string array A according to n . If n
is a nonzero integer scalar, then the elements of A are shifted by
n elements along the first non-singleton dimension of A . If
n is a vector, it must not be longer that the number of dimensions
of A with each value of n corresponding to a dimension in
A . The sign of the value(s) in n specify the direction in
the elements of A are shifted.

B = circshift ( A , n , dim ) circularly
shifts the elements of the string array A along the dimension
specified by dim . In this case, n must be a scalar integer
value.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Circularly shift the elements in a string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.compose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2079
string: str = compose ( formatSpec , A )
string: str = compose ( formatSpec , A1 , &hellip;, AN )
string: str = compose ( txt )

Format data into a string array or translate escape-character sequences.

str = compose ( formatSpec , A ) formats the data
in the array A according to the formatting operators in
formatSpec , which must be a string scalar or character vector, and
returns the result in the string array str . The formatting
operators are the same as those accepted by the sprintf function.
Unlike sprintf , which returns a single character vector,
compose returns a string array whose elements correspond to the
rows of A .

compose applies formatSpec to each row of A so that
str has the same number of rows as A . The size of str
is further determined as follows:

If the number of columns in A exceeds the number of
formatting operators in formatSpec , then formatSpec is
applied repeatedly along each row of A , adding columns to
str .
If the number of columns in A is less than the number of
formatting operators, then the operators left without a corresponding
value appear unchanged in str .
If A has zero columns, then str has the same size as
A and no formatting operators are applied.

str = compose ( formatSpec , A1 , &hellip;,
AN ) formats the data from the arrays A1 , &hellip;, AN .
The formatting operators are assigned to the input arrays in order: once
an operator has consumed a value from an input array, it becomes
unavailable to the following arrays. All input arrays must be of
compatible sizes.

str = compose ( txt ) translates escape-character
sequences, such as '\n' and '\t' , in txt and
returns the result in str , which has the same size as txt .
Any formatting operators in txt are left unchanged.

In all syntaxes, escape-character sequences appearing in literal text are
translated and each '%%' literal is converted to a single
'%' character, following the same rules as the sprintf
function. The only difference from sprintf is that a formatting
operator left without a corresponding value is emitted unchanged rather
than dropped.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
Format data into a string array or translate escape-character sequences.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.contains


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 535
string: TF = contains ( str , pattern )
string: TF = contains ( str , pattern , 'IgnoreCase' , true )

Test if strings contain pattern.

TF = contains ( str , pattern ) returns a logical
array TF of the same size as A containing true for
each corresponding element of str that contains the specified
pattern and false otherwise. Similarly to NaN
values, <missing> elements do not match any pattern and always
return false .

TF = contains ( str , pattern ,
'IgnoreCase' , true ) ignores case when determining if
str ends with pattern .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Test if strings contain pattern.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
string.count


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 421
string: out = count ( str , pattern )
string: out = count ( str , pattern , 'IgnoreCase' , true )

Count occurences of pattern in string array.

out = count ( str , pattern ) returns a numerical
array out of the same size as str containing the number of
occurences of pattern in each corresponding element of str .

out = count ( str , pattern , 'IgnoreCase' ,
true ) ignores case when identifying occurences of pattern .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Count occurences of pattern in string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
string.ctranspose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 227
string: B = ctranspose ( A )

Transpose a string matrix.

B = ctranspose ( A ) is the equivalent of the syntax
B = A ' and returns the transpose of the string matrix
A . For string arrays, ctranspose is identical to
transpose .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Transpose a string matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
string.dispstrings


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 708
string: cstr = dispstrings ( str )

Get display formatted strings for each element of a string object.

cstr = dispstrings ( str ) returns a cellstr array of
character vectors, cstr , which has the same size as the input
string object, str . These character vectors will either be the
string contents of each corresponding element or <missing> for
missing values.

Composed string elements, i.e. double quoted strings, are translated so
that any special characters are represented by their corresponding
escaped character sequence, unless the input string, str , is a
scalar, in which case text retains its original composition but newlines
are prepadded with four white space characters for aligned display.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
Get display formatted strings for each element of a string object.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
string.double


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 293
string: X = double ( str )

Convert string array to a double array.

X = char ( str ) returns a double array, X , which
has the same size as the input string str . All elements in
str that represent real or complex numbers are converted to
equivalent double values. Otherwise, NaN is returned.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Convert string array to a double array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
string.empty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 592
string: E = string.empty ()
string: E = string.empty ( sz )
string: E = string.empty ( m , n , &hellip;)

Create an empty string array.

E = string.empty () returns a 0&times;0 empty string array.
string.empty ( m , n , &hellip;) or string.empty
( sz ) returns an empty string array of the requested size, which
must have at least one dimension equal to zero. A lone dimension gives a
square size, so string.empty (3) is an error while
string.empty (0) is 0&times;0 . As for zeros , a negative
dimension counts as zero, and a size vector with nothing in it names no
size and gives 0&times;0 .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Create an empty string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.endsWith


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 537
string: TF = endsWith ( str , pattern )
string: TF = endsWith ( str , pattern , 'IgnoreCase' , true )

Test if strings end with pattern.

TF = endsWith ( str , pattern ) returns a logical
array TF of the same size as A containing true for
each corresponding element of str that ends with the specified
pattern and false otherwise. Similarly to NaN
values, <missing> elements do not match any pattern and always
return false .

TF = endsWith ( str , pattern ,
'IgnoreCase' , true ) ignores case when determining if
str ends with pattern .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Test if strings end with pattern.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
string.eq


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 277
string: TF = eq ( A , B )

Test for equality.

TF is true , if string A is lexicographically equal to
B . If one input is a string array, the other input can be a string
array, a character vector, or a cell array of character vectors. This is
equivalent to the strcmp function.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
Test for equality.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
string.erase


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 512
string: newstr = erase ( str , match )

Remove content from string array.

newstr = erase ( str , match ) removes the
occurrences of match from each element of the string array
str . match can be a string array, a character vector, or a
cell array of character vectors. When match contains more than one
piece of text, every occurrence of every element of match is
removed. newstr is a string array of the same size as str ;
the size of match need not match the size of str . Missing
values in str are preserved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Remove content from string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
string.eraseBetween


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1693
string: newstr = eraseBetween ( str , startPat , endPat )
string: newstr = eraseBetween ( str , startPos , endPos )
string: newstr = eraseBetween (&hellip;, "Boundaries" , bounds )

Erase content between start and end boundaries.

newstr = eraseBetween ( str , startPat ,
endPat ) removes from each element of the string array str
the text that occurs between the substrings startPat and
endPat , keeping the boundary substrings themselves. startPat
and endPat can be string arrays, character vectors, or cell arrays
of character vectors. For each element, the first occurrence of
startPat is matched and then the first occurrence of endPat
that begins after it; if either boundary is not found, the element is
returned unchanged.

newstr = eraseBetween ( str , startPos ,
endPos ) removes the text between the character positions
startPos and endPos , inclusive of the characters at those
positions. startPos and endPos must be positive integers
with startPos not exceeding endPos and both within the
length of the corresponding element of str .

newstr = eraseBetween (&hellip;, "Boundaries" ,
bounds ) specifies whether the boundaries are included in or
excluded from the erased text. bounds can be either
"inclusive" or "exclusive" . When boundaries are given
as substrings, the default is "exclusive" and the boundary
substrings are preserved; when given as positions, the default is
"inclusive" and the characters at those positions are erased.

startPat / endPat and startPos / endPos must either
be scalars, applied to every element of str , or be of the same size
as str and applied element-wise. newstr is a string array of
the same size as str . Missing values in str are preserved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Erase content between start and end boundaries.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.extract


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1247
string: newstr = extract ( str , pat )
string: newstr = extract ( str , pos )

Extract substrings from a string array.

newstr = extract ( str , pat ) returns the
substrings of str that match pat . pat can be a string
array, a character vector, or a cell array of character vectors; when it
contains more than one piece of text, any of them may match. Within each
element of str the matches are found left to right and do not
overlap; where alternatives match at the same position, the first listed
in pat is taken.

The matches of an element occupy a row of newstr , so the matches
run along the second dimension and every element of str must yield
the same number of matches. For a string scalar with n matches,
newstr is 1x n ; for a non-scalar str ,
newstr has one row per element (taken in column-major order) and
one column per match. Elements with no match, including missing values,
are treated as having zero matches.

newstr = extract ( str , pos ) returns the single
character located at position pos in each element of str .
pos must be a positive integer that is either a scalar, applied to
every element, or the same size as str , applied element-wise. In
this syntax newstr has the same size as str and missing
values are preserved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Extract substrings from a string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
string.extractAfter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 914
string: newstr = extractAfter ( str , pat )
string: newstr = extractAfter ( str , pos )

Extract the substring after a position or pattern.

newstr = extractAfter ( str , pat ) returns, for
each element of str , the part of the text that follows the first
occurrence of pat , excluding pat itself. pat can be a
string array, a character vector, or a cell array of character vectors,
and must either be a scalar, applied to every element of str , or
be of the same size as str and applied element-wise. If pat
is not found in an element, the corresponding element of newstr is
a missing value.

newstr = extractAfter ( str , pos ) returns the
part of each element of str that follows the character position
pos , that is, from pos +1 to the end. pos must
be a positive integer that is either a scalar or the same size as
str .

newstr is a string array of the same size as str . Missing
values in str are preserved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Extract the substring after a position or pattern.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
string.extractBefore


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 927
string: newstr = extractBefore ( str , pat )
string: newstr = extractBefore ( str , pos )

Extract the substring before a position or pattern.

newstr = extractBefore ( str , pat ) returns, for
each element of str , the part of the text that precedes the first
occurrence of pat , excluding pat itself. pat can be a
string array, a character vector, or a cell array of character vectors,
and must either be a scalar, applied to every element of str , or
be of the same size as str and applied element-wise. If pat
is not found in an element, the corresponding element of newstr is
a missing value.

newstr = extractBefore ( str , pos ) returns the
part of each element of str that precedes the character position
pos , that is, from the start up to pos -1 . pos
must be a positive integer that is either a scalar or the same size as
str .

newstr is a string array of the same size as str . Missing
values in str are preserved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Extract the substring before a position or pattern.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
string.extractBetween


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1826
string: newstr = extractBetween ( str , startPat , endPat )
string: newstr = extractBetween ( str , startPos , endPos )
string: newstr = extractBetween (&hellip;, "Boundaries" , bounds )

Extract the substrings between start and end boundaries.

newstr = extractBetween ( str , startPat ,
endPat ) returns the text that occurs between the substrings
startPat and endPat in each element of str .
startPat and endPat can be string arrays, character vectors,
or cell arrays of character vectors. Within each element the boundary
pairs are matched from left to right and do not overlap, so an element
may yield several substrings; these run along the second dimension, and
every element of str must yield the same number of matches. For a
string scalar with n matches, newstr is 1x n ;
for a non-scalar str , newstr has one row per element (taken
in column-major order) and one column per match. Elements with no match,
including missing values, are treated as having zero matches.

newstr = extractBetween ( str , startPos ,
endPos ) returns the substring between the character positions
startPos and endPos , inclusive of the characters at those
positions. This syntax extracts a single substring per element, so
newstr has the same size as str .

newstr = extractBetween (&hellip;, "Boundaries" ,
bounds ) specifies whether the boundaries are included in or
excluded from the extracted text. bounds can be either
"inclusive" or "exclusive" . When boundaries are given
as substrings, the default is "exclusive" and the boundary
substrings are not included; when given as positions, the default is
"inclusive" and the characters at those positions are included.

startPat / endPat and startPos / endPos must either
be scalars, applied to every element of str , or be of the same size
as str . Missing values in str are preserved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Extract the substrings between start and end boundaries.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
string.ge


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 266
string: TF = ge ( A , B )

Test for greater than or equal to.

TF is true , if string A is lexicographically greater
than or equal to B . If one input is a string array, the other
input can be a string array, a character vector, or a cell array of
character vectors.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Test for greater than or equal to.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
string.gt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 242
string: TF = gt ( A , B )

Test for greater than.

TF is true , if string A is lexicographically greater
than B . If one input is a string array, the other input can be a
string array, a character vector, or a cell array of character vectors.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Test for greater than.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.horzcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 458
string: C = horzcat ( A , B , &hellip;)

Horizontal concatenation of string arrays.

C = horzcat ( A , B , &hellip;) is the equivalent of
the syntax C = [ A , B , &hellip;] and horizontally
concatenates the string arrays A , B , &hellip;. All input
arrays must have the same size except along the second dimension. Any of
the input arrays may also be character matrixes, cell arrays of character
vectors, numeric arrays, or logical arrays of compatible size.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Horizontal concatenation of string arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
string.insertAfter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1233
string: newstr = insertAfter ( str , pat , newtext )
string: newstr = insertAfter ( str , pos , newtext )

Insert text after a pattern or position.

newstr = insertAfter ( str , pat , newtext )
inserts the text newtext into each element of str after
every non-overlapping occurrence of the substring pat . pat
can be a string array, a character vector, or a cell array of character
vectors, and must either be a scalar, applied to every element of
str , or be of the same size as str and applied
element-wise. If pat is not found in an element, that element is
returned unchanged.

newstr = insertAfter ( str , pos , newtext )
inserts newtext after the character position pos , that is,
between the characters at positions pos and pos +1 .
pos must be a positive integer not exceeding the length of the
corresponding element of str , and must be either a scalar or the
same size as str .

newtext can be a string array, a character vector, or a cell array
of character vectors, and must be either a scalar, inserted at every
position, or of the same size as str . newstr is a string
array of the same size as str . Missing values in str are
preserved, and a missing value in newtext makes the corresponding
element of newstr missing.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Insert text after a pattern or position.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
string.insertBefore


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1240
string: newstr = insertBefore ( str , pat , newtext )
string: newstr = insertBefore ( str , pos , newtext )

Insert text before a pattern or position.

newstr = insertBefore ( str , pat , newtext )
inserts the text newtext into each element of str before
every non-overlapping occurrence of the substring pat . pat
can be a string array, a character vector, or a cell array of character
vectors, and must either be a scalar, applied to every element of
str , or be of the same size as str and applied
element-wise. If pat is not found in an element, that element is
returned unchanged.

newstr = insertBefore ( str , pos , newtext )
inserts newtext before the character position pos , that is,
between the characters at positions pos -1 and pos .
pos must be a positive integer not exceeding the length of the
corresponding element of str , and must be either a scalar or the
same size as str .

newtext can be a string array, a character vector, or a cell array
of character vectors, and must be either a scalar, inserted at every
position, or of the same size as str . newstr is a string
array of the same size as str . Missing values in str are
preserved, and a missing value in newtext makes the corresponding
element of newstr missing.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Insert text before a pattern or position.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.ipermute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 479
string: A = ipermute ( B , dims )

Inverse of the generalized transpose for a string N-D array.

A = ipermute ( B , dims ) returns the inverse of
the generalized transpose performed by the permute function. The
expression ipermute (permute ( A , dims ), dims )
returns the original array A .

dims must index all the dimensions 1:ndims ( B ) of the
input array B , in any order, but only once. The dimension of
B specified in dims ( N ) gets remapped to the
N th dimension of A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
Inverse of the generalized transpose for a string N-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.iscolumn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 125
string: TF = iscolumn ( str )

Test if string array is a column vector.

TF is true , if string array str is a column vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Test if string array is a column vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.isempty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 104
string: TF = isempty ( str )

Test if string array is empty.

TF is true , if string array str is empty.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Test if string array is empty.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.ismatrix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 111
string: TF = ismatrix ( str )

Test if string array is a matrix.

TF is true , if string array str is a matrix.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Test if string array is a matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.ismember


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1274
string: TF = ismember ( A , B )
string: TF = ismember ( A , B , 'rows' )
string: [ TF , index ] = ismember (&hellip;)
string: [ TF , index ] = ismember (&hellip;, 'legacy' )

Find string elements in a set.

TF = ismember ( A , B ) returns a logical array
TF of the same size as A containing true for each
corresponding element of A that is in B and false
otherwise. Similarly to NaN values, <missing> elements
are not equal with each other and always return false .

TF = ismember ( A , B , 'rows' ) only
applies to string matrices with the same number of columns, in which
case the logical vector TF contains true for each row of
A that is also a row in B . TF has the same number of
rows as A .

[ TF , index ] = ismember ( A , B ) also returns
an index array of the same size as A containing the lowest index in
B for each element of A that is a member of B and 0
otherwise. If the 'rows' optional argument is used, then the
returning index is a column vector with the same rows as A and it
contains the lowest index in B for each row of A that is a
member of B and 0 otherwise. If the 'legacy' optional
argument is specified, then the highest index of matched elements is
returned. Unless multiple matches exist, the 'legacy' option has
no effect on the returned index .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Find string elements in a set.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
string.ismissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 634
string: TF = ismissing ( str )
string: TF = ismissing ( str , indicator )

Find missing elements in string array.

TF = ismissing ( str ) returns a logical array,
TF , with any true values corresponding to missing elements
in the input string array str .

TF = ismissing ( str , indicator ) also returns a
logical array, TF , with any true values corresponding to
elements in the input string array str , which are lexicographically
equal to the values in indicator .

indicator must be either a character vector or a string vector
or a cell vector of character vectors.

The output array TF has the same size as the input array str .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Find missing elements in string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
string.isrow


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 116
string: TF = isrow ( str )

Test if string array is a row vector.

TF is true , if string array str is a row vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Test if string array is a row vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.isscalar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 111
string: TF = isscalar ( str )

Test if string array is a scalar.

TF is true , if string array str is a scalar.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Test if string array is a scalar.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.issorted


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1695
string: TF = issorted ( str )
string: TF = issorted ( str , dim )
string: TF = issorted ( str , direction )
string: TF = issorted ( str , dim , direction )
string: TF = issorted (&hellip;, 'MissingPlacement' , MP )

Return true if string array is sorted.

TF = issorted ( str ) returns a logical scalar TF ,
which is true , if the string array str is sorted in
ascending order, and false otherwise.

TF = issorted ( str , dim ) returns a logical
scalar TF , which is true , if the string array str
is sorted in ascending order along the dimension dim , and
false otherwise.

TF = issorted ( str , direction ) returns a logical
scalar TF , which is true , if the string array str is
sorted in the direction specified by direction , and false
otherwise. direction can be any of the following options:

'ascend' , which is the default, checks if elements are in
ascending order.
'descend' checks if elements are in descending order.
'monotonic' checks if elements are either in ascending or
descending order.
'strictascend' checks if elements are in ascending order
and there are no duplicate or missing elements.
'strictdescend' checks if elements are in descending order
and there are no duplicate or missing elements.
'strictmonotonic' checks if elements are either in
ascending or descending order and there are no duplicate or missing
elements.

TF = issorted (&hellip;, 'MissingPlacement' ,
MP ) specifies where missing elements ( <missing> ) are
placed with one of the following options specified in MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Return true if string array is sorted.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
string.issortedrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2547
string: TF = issortedrows ( str )
string: TF = issortedrows ( str , col )
string: TF = issortedrows ( str , direction )
string: TF = issortedrows ( str , col , direction )
string: TF = issortedrows (&hellip;, 'MissingPlacement' , MP )

Return true if string matrix rows are sorted.

TF = issortedrows ( str ) returns a logical scalar
TF , which is true , if the rows in the 2-D string array
str are sorted in ascending order, and false otherwise.

TF = issortedrows ( str , col ) returns a logical
scalar TF , which is true , if the string array str is
sorted according to the columns specified by the vector col , and
false otherwise. col must explicitly contain non-zero
integers whose absolute values index existing columns in str .
Positive elements sort the corresponding columns in ascending order,
while negative elements sort the corresponding columns in descending
order.

TF = issortedrows ( str , direction ) checks if the
rows in str are sorted according to the specified direction, which
can be one of the following options:

'ascend' , which is the default, checks if elements are in
ascending order.
'descend' checks if elements are in descending order.
'monotonic' checks if elements are either in ascending or
descending order.
'strictascend' checks if elements are in ascending order
and there are no duplicate or missing elements.
'strictdescend' checks if elements are in descending order
and there are no duplicate or missing elements.
'strictmonotonic' checks if elements are either in
ascending or descending order and there are no duplicate or missing
elements.

Alternatively, direction can be a cell array of character vectors
specifying the sorting direction for each individual column of str ,
in which case the number of elements in direction must equal the
number of columns in str .

TF = issortedrows ( str , col , direction )
checks if the rows in the string array str are sorted according to
the columns specified in col using the corresponding sorting
direction specified in direction . In this case, the sign of the
values in col is ignored. col and direction must have
the same length, but not necessarily the same number of elements as the
columns in str .

TF = issortedrows (&hellip;, 'MissingPlacement' ,
MP ) specifies where missing elements ( <missing> ) are
placed with one of the following options specified in MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Return true if string matrix rows are sorted.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.isstring


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 84
string: TF = isstring ( str )

Test for string array.

TF is true for string inputs.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Test for string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.isvector


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 111
string: TF = isvector ( str )

Test if string array is a vector.

TF is true , if string array str is a vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Test if string array is a vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
string.join


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1114
string: newstr = join ( str )
string: newstr = join ( str , delimiter )
string: newstr = join ( str , dim )
string: newstr = join ( str , delimiter , dim )

Combine string array elements.

newstr = join ( str ) combines the elements of str
along the last dimension whose size is not 1, placing a single space
between consecutive elements. That dimension is reduced to size 1.

newstr = join ( str , delimiter ) uses
delimiter instead of a space. delimiter can be a string
array, a character vector, or a cell array of character vectors. A
scalar delimiter is placed between every pair of elements. An
array delimiter supplies the text placed between consecutive
elements and must have one fewer element than str along the joined
dimension; its other dimensions must be 1 or match str .

newstr = join ( str , dim ) and
newstr = join ( str , delimiter , dim )
combine the elements along dimension dim .

newstr has the size of str with the joined dimension reduced
to 1. If any element being combined, or any delimiter placed between
them, is a missing value, the corresponding element of newstr is a
missing value.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Combine string array elements.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.keyHash


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1097
string: key = keyHash ( str )
string: key = keyHash ( str , base )

Generate a hash code for string array.

key = keyHash ( str ) generates a uint64 scalar
that represents the input array str . keyHash utilizes the
64-bit FNV-1a variant of the Fowler-Noll-Vo non-cryptographic hash
function.

key = keyHash ( str , base ) also generates a
64-bit hash code using base as the offset basis for the FNV-1a
hash algorithm. base must be a uint64 integer type
scalar. Use this syntax to cascade keyHash on multiple objects
for which a single hash code is required.

Elements are hashed together with their lengths, so the boundaries
between them are part of the key and a string array does not hash as
any other splitting of the same characters. Missing elements are equal
to one another and distinct from the empty string. Two arrays that
keyMatch reports as the same key always hash alike.

Note that unlike MATLAB, this implementation does not use any random
seed. As a result, keyHash will always generate the exact same
hash key for any particular input across different workers and Octave
sessions.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Generate a hash code for string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
string.le


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 260
string: TF = le ( A , B )

Test for less than or equal to.

TF is true , if string A is lexicographically less
than or equal to B . If one input is a string array, the other
input can be a string array, a character vector, or a cell array of
character vectors.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Test for less than or equal to.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
string.length


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 226
string: N = length ( str )

Length of a string vector.

N = length ( str ) returns the size of the longest
dimension of the string array str , unless any of its dimensions
has zero length, in which case length ( D ) returns 0.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Length of a string vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
string.lower


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 245
string: newstr = lower ( str )

Convert contents of string array to lower case.

newstr = lower ( str ) converts all upper case
characters in every element of the string array str to lower case.
newstr is a string array of the same size as str .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Convert contents of string array to lower case.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
string.lt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 236
string: TF = lt ( A , B )

Test for less than.

TF is true , if string A is lexicographically less
than B . If one input is a string array, the other input can be a
string array, a character vector, or a cell array of character vectors.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
Test for less than.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.matches


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 530
string: TF = matches ( str , pattern )
string: TF = matches ( str , pattern , 'IgnoreCase' , true )

Test if strings match pattern.

TF = matches ( str , pattern ) returns a logical
array TF of the same size as A containing true for
each corresponding element of str that matches the specified
pattern and false otherwise. Similarly to NaN
values, <missing> elements do not match any pattern and always
return false .

TF = matches ( str , pattern , 'IgnoreCase' ,
true ) ignores case when determining if str starts with
pattern .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Test if strings match pattern.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
string.ndims


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 146
string: out = ndims ( str )

Number of dimensions in a string array.

out = ndims ( str ) returns the number of dimensions of
the string array D .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Number of dimensions in a string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
string.ne


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 301
string: TF = ne ( A , B )

Test for inequality.

TF is true , if string A is lexicographically not
equal to B . If one input is a string array, the other input can be
a string array, a character vector, or a cell array of character vectors.
TF = ne ( A , B ) is equivalent to
TF = ! strcmp ( A , B ) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
Test for inequality.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
string.numel


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
string: out = numel ( str )

Total number of elements in a string array.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Total number of elements in a string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
string.pad


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1123
string: newstr = pad ( str )
string: newstr = pad ( str , nchars )
string: newstr = pad ( str , side )
string: newstr = pad ( str , nchars , side )
string: newstr = pad (&hellip;, padchar )

Add leading or trailing characters to string array.

newstr = pad ( str ) pads each element of str with
trailing spaces so that every element is as long as the longest one.

newstr = pad ( str , nchars ) pads each element to
nchars characters. Elements that already have more than
nchars characters are left unchanged; pad never truncates.

newstr = pad ( str , side ) and
newstr = pad ( str , nchars , side ) add the
padding on the side given by side , which can be "left" ,
"right" , or "both" . The default is "right" ; for
"both" , an odd number of pad characters places the extra one on
the right.

newstr = pad (&hellip;, padchar ) pads with the single
character padchar instead of a space. As padchar is the last
argument and a single character, it is told apart from side by its
length.

Length is measured in characters, not bytes. newstr is a string
array of the same size as str , and missing values in str are
preserved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Add leading or trailing characters to string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.permute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 435
string: B = permute ( A , dims )

Generalized transpose for a string N-D array.

B = permute ( A , dims ) returns the generalized
transpose of the string array A by rearranging its dimensions
according to the permutation vector specified in dims .

dims must index all the dimensions 1:ndims ( A ) of the
input array A , in any order, but only once. The N th
dimension of A gets remapped to the dimension in B specified
by dims ( N ) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Generalized transpose for a string N-D array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
string.plus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 221
string: newstr = plus ( str1 , str2 )

Append strings.

newstr = lower ( str ) is the equivalent of the syntax
newstr = str1 + str2 and appends str2 to
str1 . Both input arguments must be string arrays of compatible
size.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
Append strings.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.repelem


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 956
string: B = repelem ( A , n )
string: B = repelem ( A , d1 , &hellip;, dN )

Repeat copies of string array elements.

B = repelem ( A , n ) returns a string vector
B containing repeated elements of the input A , which must be
a string vector. If n is a scalar, each element of A is
repeated n times along the non-singleton dimension of A . If
n is a vector, it must have the same elements as A , in which
case it specifies the number of times to repeat each corresponding
element of A .

B = repelem ( A , d1 , &hellip;, dN ) returns
an array B with each element of A repeated according to the
the list of input arguments d1 , &hellip;, dN each
corresponding to a different dimension 1:ndims ( A ) of the
input array A . d1 , &hellip;, dN must be either scalars
or vectors with the same length as the corresponding dimension of
A containing non-negative integer values specifying the number of
repetitions of each element along the corresponding dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Repeat copies of string array elements.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.repelems


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 453
string: B = repelems ( A , R )

Construct a vector of repeated elements from a string array.

B = repelems ( A , R ) returns a string vector
B containing repeated elements of the input A , which must be
a string vector. R must be a 2&times;N matrix of integers.
Entries in the first row of R correspond to the linear indexing of
the elements in A to be repeated. The corresponding entries in the
second row of R specify the repeat count of each element.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
Construct a vector of repeated elements from a string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.replace


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1036
string: newstr = replace ( str , old , new )

Replace substrings in string array.

newstr = replace ( str , old , new ) replaces
every occurrence of the substring old with new in each
element of the string array str . old and new can be
string arrays, character vectors, or cell arrays of character vectors.

When old contains several substrings, new must either be a
single substring, used to replace all of them, or be of the same size as
old , replacing each substring of old with the corresponding
element of new . All substrings are replaced in a single left to
right pass over each element: at each position the substrings of
old are tried in order, the first that matches is replaced, and
the scan resumes past the inserted text, so replacements are not
themselves re-scanned. old and new are applied to every
element of str ; their size need not match the size of str .

newstr is a string array of the same size as str . A
substring of old that does not occur leaves the text unchanged, and
missing values in str are preserved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Replace substrings in string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
string.replaceBetween


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2007
string: newstr = replaceBetween ( str , startPat , endPat , newtext )
string: newstr = replaceBetween ( str , startPos , endPos , newtext )
string: newstr = replaceBetween (&hellip;, "Boundaries" , bounds )

Replace content between start and end boundaries.

newstr = replaceBetween ( str , startPat ,
endPat , newtext ) replaces, in each element of the string
array str , the text that occurs between the substrings
startPat and endPat with newtext , keeping the boundary
substrings themselves. startPat and endPat can be string
arrays, character vectors, or cell arrays of character vectors. For each
element, the first occurrence of startPat is matched and then the
first occurrence of endPat that begins after it; if either boundary
is not found, the element is returned unchanged.

newstr = replaceBetween ( str , startPos ,
endPos , newtext ) replaces the text between the character
positions startPos and endPos , inclusive of the characters at
those positions, with newtext . startPos and endPos
must be positive integers with startPos not exceeding endPos
and both within the length of the corresponding element of str .

newstr = replaceBetween (&hellip;, "Boundaries" ,
bounds ) specifies whether the boundaries are included in or
excluded from the replaced text. bounds can be either
"inclusive" or "exclusive" . When boundaries are given
as substrings, the default is "exclusive" and the boundary
substrings are preserved; when given as positions, the default is
"inclusive" and the characters at those positions are replaced.

startPat / endPat and startPos / endPos must either
be scalars, applied to every element of str , or be of the same size
as str and applied element-wise. newtext can be a string
array, a character vector, or a cell array of character vectors, and must
be either a scalar or the same size as str . newstr is a
string array of the same size as str . Missing values in str
are preserved, and a missing value in newtext makes the
corresponding element of newstr missing.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Replace content between start and end boundaries.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
string.repmat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 598
string: B = repmat ( A , n )
string: B = repmat ( A , d1 , &hellip;, dN )
string: B = repmat ( A , dimvec )

Repeat copies of a string array.

B = repmat ( A , n ) returns a string array B
containing n copies of the input string array A along every
dimension of A .

B = repmat ( A , d1 , &hellip;, dN ) returns an
array B containing copies of A along the dimensions specified
by the list of scalar integer values d1 , &hellip;, dN , which
specify how many copies of A are made in each dimension.

B = repmat ( A , dimvec ) is equivalent to the
previous syntax with dimvec = [ d1 , &hellip;, dN ] .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Repeat copies of a string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.reshape


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 738
string: B = reshape ( A , d1 , &hellip;, dN )
string: B = reshape ( A , &hellip;, [] , &hellip;)
string: B = reshape ( A , dimvec )

Reshape string array.

B = reshape ( A , d1 , &hellip;, dN ) returns
a string array B with specified dimensions d1 , &hellip;,
dN , whose elements are taken columnwise from the string array
A . The product of d1 , &hellip;, dN must equal the total
number of elements in A .

B = reshape ( A , &hellip;, [] , &hellip;) returns
a string array B with one dimension unspecified which is calculated
automatically so that the product of dimensions in B matches the
total elements in A , which must be divisible the product of
specified dimensions. An empty matrix ([]) is used to flag the
unspecified dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
Reshape string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.reverse


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 240
string: newstr = reverse ( str )

Reverse order of characters in string array.

newstr = reverse ( str ) reverses the order of the
characters in every each element of the string array str .
newstr is a string array of the same size as str .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Reverse order of characters in string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
string.size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1073
string: sz = size ( str )
string: dim_sz = size ( str , dim )
string: dim_sz = size ( str , d1 , d2 , &hellip;)
string: [ rows , columns , &hellip;, dim_n_sz ] = size (&hellip;)

Return the size of a string array.

sz = size ( str ) returns a row vector with the size
(number of elements) of each dimension for the string array str .

dim_sz = size ( str , dim ) returns the size of
the corresponding dimension specified in dim . If dim is a
vector, then dim_sz is a vector of the same length and with each
element corresponding to a specified dimension. Multiple dimensions may
also be specified as separate arguments.

With a single output argument, size returns a row vector. With
several, the size of dimension N is returned in the Nth argument.
Asking for fewer output arguments than the array has dimensions folds
the trailing dimensions into the last one, so [r, c] = size
( str ) on a 2-by-2-by-2 array returns 2 and 4; asking for more pads
with ones. When a dimension is named, however, the number of output
arguments must equal the number of dimensions requested.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Return the size of a string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
string.sort


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1626
string: B = sort ( A )
string: B = sort ( A , dim )
string: B = sort ( A , direction )
string: B = sort ( A , dim , direction )
string: B = sort (&hellip;, 'MissingPlacement' , MP )
string: [ B , index ] = sort ( A , &hellip;)

Sort elements in a string array.

B = sort ( A ) sorts the elements of the string array
A in ascending order. Elements are compared lexicographically by
their Unicode code points, with the empty string "" sorting
before any non-empty string. If A is a matrix,
sort ( A ) sorts each column of A in ascending order.
For multidimensional arrays, sort ( A ) sorts along the first
non-singleton dimension.

B = sort ( A , dim ) sorts along the dimension
specified by dim .

B = sort ( A , direction ) also specifies the
sorting direction, which can be either 'ascend' (default) or
'descend' .

B = sort (&hellip;, 'MissingPlacement' , MP )
specifies where to place the missing elements ( <missing> )
returned in B with any of the following options specified in
MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.

[ B , index ] = sort ( A , &hellip;) also returns a
sorting index containing the original indices of the elements in the
sorted array.

If A is a vector, then index contains the original
linear indices of the elements in the sorted vector B such that
B = A ( index ) .
If A is an M&times;N matrix and dim = 1 , then
index contains the original row indices of the elements in the
sorted vector B such that for j = 1:N ,
B (:,j) = A ( index (:,j),j) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Sort elements in a string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.sortrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2010
string: B = sortrows ( A )
string: B = sortrows ( A , col )
string: B = sortrows ( A , direction )
string: B = sortrows ( A , col , direction )
string: B = sortrows (&hellip;, 'MissingPlacement' , MP )
string: [ B , index ] = sortrows ( A , &hellip;)

Sort rows in a string array.

B = sortrows ( A ) sorts the rows of the 2-D string
array A in ascending order. The sorted array B has the same
size as A .

B = sortrows ( A , col ) sorts A according to
the columns specified by the numeric vector col , which must
explicitly contain non-zero integers whose absolute values index existing
columns in A . Positive elements sort the corresponding columns in
ascending order, while negative elements sort the corresponding columns
in descending order.

B = sortrows ( A , direction ) also specifies the
sorting direction, which can be either 'ascend' (default) or
'descend' applying to all columns in A . Alternatively,
direction can be either a string array or a cell array of character
vectors specifying the sorting direction for each individual column of
A , in which case the number of elements in direction must
equal the number of columns in A .

B = sortrows ( A , col , direction ) sorts the
string array A according to the columns specified in col
using the corresponding sorting direction specified in direction .
In this case, the sign of the values in col is ignored. col
and direction must have the same number of elements, but not
necessarily equal to the columns of A .

B = sortrows (&hellip;, 'MissingPlacement' , MP )
specifies where to place the missing elements ( <missing> )
returned in B with any of the following options specified in
MP :

'auto' , which is the default, places missing elements last
for ascending sort and first for descending sort.
'first' places missing elements first.
'last' places missing elements last.

[ B , index ] = sortrows ( A , &hellip;) also returns
an index vector containing the original row indices of A in the
sorted matrix B such that B = A ( index ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Sort rows in a string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
string.split


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1564
string: newstr = split ( str )
string: newstr = split ( str , delimiter )
string: newstr = split ( str , delimiter , dim )
string: [ newstr , match ] = split (&hellip;)

Split string array at delimiters.

newstr = split ( str ) divides each element of str
at whitespace characters and returns the pieces as a string array. The
whitespace characters are the space, tab, newline, carriage return, form
feed, and vertical tab.

newstr = split ( str , delimiter ) divides each
element at the substrings specified by delimiter , which can be a
string array, a character vector, or a cell array of character vectors.
When delimiter contains several substrings they are all used; at a
given position the substrings are tried in order and the first that
matches is taken. Delimiters are not collapsed, so consecutive
delimiters yield empty strings in newstr .

The pieces of each element are laid out along a new dimension. For a
string scalar that splits into n pieces, newstr is
n x1 ; for an Mx1 column it is Mx n ; for a
1xM row it is 1xMx n ; and in general the pieces extend
the first trailing singleton dimension. Every element of str must
split into the same number of pieces. Missing values in str are
preserved and count as a single piece.

newstr = split ( str , delimiter , dim ) lays
the pieces out along dimension dim , which must be a dimension along
which str has size 1.

[ newstr , match ] = split (&hellip;) also returns the
delimiters matched between the pieces. match has the same layout
as newstr but with one fewer element along the split dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Split string array at delimiters.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
string.splitlines


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 782
string: newstr = splitlines ( str )

Split string array at newline characters.

newstr = splitlines ( str ) divides each element of
str at its newline characters and returns the lines as a string
array. The recognized newline characters are the line feed, the carriage
return, a carriage return followed by a line feed (treated as a single
boundary), the vertical tab, the form feed, and the Unicode next-line
( U+0085 ), line-separator ( U+2028 ), and paragraph-separator
( U+2029 ) characters.

The lines are laid out along a new dimension exactly as for split :
a string scalar with n lines yields an n x1 array, and
an Mx1 column yields an Mx n array. Every element of
str must contain the same number of newlines. Missing values in
str are preserved and count as a single line.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Split string array at newline characters.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
string.startsWith


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 551
string: TF = startsWith ( str , pattern )
string: TF = startsWith ( str , pattern , 'IgnoreCase' , true )

Test if strings start with pattern.

TF = startsWith ( str , pattern ) returns a logical
array TF of the same size as A containing true for
each corresponding element of str that starts with the specified
pattern and false otherwise. Similarly to NaN
values, <missing> elements do not match any pattern and always
return false .

TF = startsWith ( str , pattern ,
'IgnoreCase' , true ) ignores case when determining if
str starts with pattern .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Test if strings start with pattern.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
string.strcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 402
string: newstr = strcat ( str1 , str2 , &hellip;)

Horizontal concatenation of texts in string array.

newstr = strcat ( str1 , str2 , &hellip;) merges
horizontally all the input arguments into a string array, as long as any
of the input arguments is a string array. All inputs must be of common
size or scalars. All inputs must be character vectors, cell arrays of
character vectors, or string arrays.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Horizontal concatenation of texts in string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
string.strcmp


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 583
string: TF = strcmp ( A , B )

Compare strings.

TF is true , if string A is lexicographically equal to
B . If one input is a string array, the other input can be a string
array, a character vector, or a cell array of character vectors.

If either A or B is a string array or a cell array of
character vectors, then a logical array TF of the same size is
returned, containing the values described above for every member of the
array. In this case, the other argument may also be a string array or a
cell array of character vectors (of the same size or scalar), or a
character vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
Compare strings.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.strcmpi


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 647
string: TF = strcmpi ( A , B )

Compare strings (case insensitive).

TF is true , if string A is lexicographically equal to
B , disregarding case of alphabetic characters. If one input is a
string array, the other input can be a string array, a character vector,
or a cell array of character vectors.

If either A or B is a string array or a cell array of
character vectors, then a logical array TF of the same size is
returned, containing the values described above for every member of the
array. In this case, the other argument may also be a string array or a
cell array of character vectors (of the same size or scalar), or a
character vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Compare strings (case insensitive).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
string.string


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1794
string: str = string ()
string: str = string ( in )
string: str = string ( calendarDuration , 'Format' , FMT )
string: str = string ( duration , 'Format' , FMT )
string: str = string ({ in1 , &hellip;, inN })

Create a new string array.

str = string () creates a scalar string array, whose element
contains an empty character vector.

str = string ( in ) creates a string array of the same
size as in , which is converted to string according to the following
options:

character arrays are converted so that each row becomes a string
element, with any trailing whitespace preserved; cell arrays of character
vectors are stored as-is.
numeric arrays are converted via the code num2str function.
logical arrays are converted to either false or
true character sequences.
categorical arrays are converted via their cellstr method.
datetime arrays are converted via their dispstrings method.
calendarDuration arrays and duration arrays are converted via their
respective cellstr methods, in which case an extra pair argument
is supported to allow parsing to the respective method the appropriate
display format. See calendarDuration and duration for
valid formats parsed through FMT to each class method. Extra input
arguments to the string constructor except for this case are
ignored.
missing arrays are converted to a string array of missing elements.

str = string ({ in1 , &hellip;, inN }) creates a
string array from a cell array, which may contain any combination of the
aforementioned data types, provided that each cell element is compatible
to a string scalar. When using this syntax, calendarDuration arrays and
duration arrays are converted via their dispstrings method, hence
no extra format argument is meaningful.

See also:
calendarDuration,
categorical,
datetime,
duration,
missing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Create a new string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
string.strip


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 975
string: newstr = strip ( str )
string: newstr = strip ( str , side )
string: newstr = strip ( str , stripchar )
string: newstr = strip ( str , side , stripchar )

Remove leading and trailing characters from string array.

newstr = strip ( str ) removes all consecutive
whitespace characters from the beginning and end of each element of
str . The whitespace characters are the space, tab, newline,
carriage return, form feed, and vertical tab.

newstr = strip ( str , side ) removes whitespace
from the side given by side , which can be "left" ,
"right" , or "both" (the default).

newstr = strip ( str , stripchar ) removes the
single character stripchar instead of whitespace. Because the side
keywords are longer than one character, a single-character second
argument is always treated as stripchar .

newstr = strip ( str , side , stripchar )
removes stripchar from the given side .

newstr is a string array of the same size as str . Missing
values in str are preserved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
Remove leading and trailing characters from string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
string.strlength


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
string: out = strlength ( str )

Length of text in string arrays.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Length of text in string arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.strncmp


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 638
string: TF = strncmp ( A , B , n )

Compare first n characters of strings.

TF is true , if the first n characters of strings
A and B are lexicographically equal. If one input is a
string array, the other input can be a string array, a character vector,
or a cell array of character vectors.

If either A or B is a string array or a cell array of
character vectors, then a logical array TF of the same size is
returned, containing the values described above for every member of the
array. In this case, the other argument may also be a string array or a
cell array of character vectors (of the same size or scalar), or a
character vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Compare first n characters of strings.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
string.strncmpi


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 702
string: TF = strncmpi ( A , B , n )

Compare first n characters of strings (case insensitive).

TF is true , if the first n characters of strings
A and B are lexicographically equal, disregarding case of
alphabetic characters. If one input is a string array, the other input
can be a string array, a character vector, or a cell array of character
vectors.

If either A or B is a string array or a cell array of
character vectors, then a logical array TF of the same size is
returned, containing the values described above for every member of the
array. In this case, the other argument may also be a string array or a
cell array of character vectors (of the same size or scalar), or a
character vector.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
Compare first n characters of strings (case insensitive).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
string.transpose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 168
string: B = transpose ( A )

Transpose a string matrix.

B = transpose ( A ) is the equivalent of the syntax
B = A .' and returns the transpose of the string
matrix A .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Transpose a string matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
string.unique


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1418
string: B = unique ( A )
string: B = unique ( A , 'rows' )
string: [ B , ixA , ixB ] = unique (&hellip;)
string: &hellip; = unique (&hellip;, order )
string: &hellip; = unique (&hellip;, occurrence )

Unique values in a string array.

B = unique ( A ) returns the unique values of the string
array A in the string vector B sorted lexicographically. If
If A is a column vector, then B is also a column vector,
otherwise unique returns a row vector.

B = unique ( A , 'rows' ) returns the unique rows
of the string matrix A in the string matrix B sorted in
lexicographical order.

[ B , ixA , ixB ] = unique (&hellip;) also returns
index vectors ixA and ixB such that
B = A ( ixA ) and
A = B ( ixB ) , unless the 'rows' optional
argument is given, in which case B = A ( ixA ,:)
and A = B ( ixB ,:) .

&hellip; = unique (&hellip;, order ) also specifies the order
of the returned unique values. order may be either
'sorted' , which is the default behavior, or 'stable' , in
which case the unique values are returned in order of appearance.

&hellip; = unique (&hellip;, occurrence ) also specifies the
which index is returned in ixA , where there are repeated values or
rows (if opted) in the input categorical array. occurrence may be
either 'first' , which is the default and returns the index of the
first occurrence of each unique value, or 'last' , in which case
the last occurrence of each unique value is returned.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Unique values in a string array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
string.upper


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 245
string: newstr = upper ( str )

Convert contents of string array to upper case.

newstr = upper ( str ) converts all lower case
characters in every element of the string array str to upper case.
newstr is a string array of the same size as str .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Convert contents of string array to upper case.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
string.vertcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 453
string: C = vertcat ( A , B , &hellip;)

Vertical concatenation of string arrays.

C = vertcat ( A , B , &hellip;) is the equivalent of
the syntax C = [ A ; B ; &hellip;] and vertically
concatenates the string arrays A , B , &hellip;. All input
arrays must have the same size except along the first dimension. Any of
the input arrays may also be character matrixes, cell arrays of character
vectors, numeric arrays, or logical arrays of compatible size.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Vertical concatenation of string arrays.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
struct2ods


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1462
datatypes: struct2ods ( filename , s )

Write a scalar structure of tables to a multi-sheet OpenDocument spreadsheet.

struct2ods ( filename , s ) writes each field of the scalar
structure s to its own sheet in the OpenDocument spreadsheet named by
filename . Every field of s must hold a table or a
timetable ; the field name becomes the sheet name. A timetable&rsquo;s row
times lead its sheet and are tagged as row times, so ods2struct
returns a timetable for that sheet and a table for the others. A timetable
carrying an event table gets a second sheet holding it, named
<sheet>_Events , and a ## Events crossref: line above the
first sheet marker of the hidden sheet tying the two together and carrying
the event table&rsquo;s three variable designations. Both the
compressed .ods and the flat .fods formats are supported,
selected by the file extension.

Full type fidelity is preserved through a hidden, sectioned
__datatypes_meta__ sheet, exactly as for the single-table
table2ods method; the workbook round-trips through ods2struct .

A field whose table carries an 'ActualSheetName' custom property
(see addprop ) uses that value as the sheet name instead of the field
name, which lets a sheet name that is not a valid identifier (for example
'Sales 2024' ) round-trip. Sheet names must be non-empty and must not
contain any of the characters [ ] * ? : / , and the
resolved names must be unique.

See also:
ods2struct,
table2ods,
ods2table,
writetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 77
Write a scalar structure of tables to a multi-sheet OpenDocument spreadsheet.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
struct2table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1177
datatypes: tbl = struct2table ( S )
datatypes: tbl = struct2table ( S , Name , Value )

Convert a structure array to a table.

tbl = struct2table ( S ) converts a structure array S
to the table tbl , where each field of the input structure becomes a
variable in the output table. For a scalar structure with N fields,
all of which have M rows, or an M&times;1 or 1&times;M structure
array with N fields, the output is an M&times;N table.

tbl = struct2table ( S , Name , Value ) specifies
optional parameters for creating the table tbl with the following
Name-Value paired arguments.

Name Value
'AsArray' A logical scalar specifying whether to
treat a scalar input as a structure array, which allows the fields containing
data of different sizes.
'RowNames' A cell array of character vectors or
a string array defining the row names of tbl . The names must be unique
but not necessarily valid variable names.
'DimensionNames' A cell array of character vectors or
a string array defining the dimension names of tbl . The names must be
unique and not in conflict with variable names. By default, dimension names
are 'Row', 'Variables' .

See also:
array2table,
cell2table,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Convert a structure array to a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
struct2xlsx


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 890
datatypes: struct2xlsx ( filename , s )

Write a scalar structure of tables to a multi-sheet Excel workbook.

struct2xlsx ( filename , s ) writes each field of the scalar
structure s to its own sheet in the Office Open XML workbook named by
filename ( .xlsx or .xlsm ). Every field must hold a
table ; the field name becomes the sheet name.

This is the Excel counterpart of struct2ods . Like writetable ,
it writes the MATLAB-interoperable format (a variable-name header row
followed by the data, with no hidden type metadata); read it back with
xlsx2struct . A field whose table carries an 'ActualSheetName'
custom property uses that value as the sheet name instead of the field name.
Sheet names must be non-empty, at most 31 characters, and must not contain
any of the characters [ ] * ? : / ; the resolved
names must be unique.

See also:
xlsx2struct,
struct2ods,
writetable,
readtable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
Write a scalar structure of tables to a multi-sheet Excel workbook.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2010
datatypes: table

Array of tabular data containing multiple columnar variables.

A table is a 2-dimensional data structure that collects heterogeneous data
and metadata into a single container. Tables are suitable for storing
columnar data much like spreadsheets but they can also be used for storing
more complex data including multicolumnar variables and nested tables.

Tables can be subscripted using parentheses like ordinary numeric arrays,
but in addition to indexing with numeric and logical vectors, you can also
use the table&rsquo;s variable or row names much like indexing a structure field
as well as using a vartype class object to make a selection of
variable types. While these methods will return a subset of the original
table, you can also use curly brackets much like cell arrays to retrieve
the contents of the table. In this case, the original data types of the
selected variables are returned.

An empty numeric variable subscript selects no variables, so
tbl (:,[]) is a table of the same height with nothing in
it. An empty cell is not a subscript and is refused, as it is on any
other array.

Assigning an empty matrix to a subscripted table deletes rows or
variables. tbl ( rows ,:) = [] removes the referenced
rows, tbl (:, vars ) = [] removes the referenced
variables, and tbl . varname = [] removes a single
variable by name. One of the two subscripts must be a colon, and when
both of them are, the rows are removed. A table that has lost its last
variable keeps its height, so a five-row table displays as
5x0 rather than as empty.

Besides the table constructor, you can also use array2table ,
cell2table , and struct2table to create tables from the
respective data types.

Besides all numeric data types, other supported data types that can be
stored in a table array are logical , categorical ,
cell , (including cellstr ), calendarDuration ,
duration , datetime , string , and struct
arrays, as well as table itself.

See also:
vartype,
array2table,
cell2table,
struct2table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Array of tabular data containing multiple columnar variables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
table.CustomProperties


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1148
tabular: property CustomProperties

Customized metadata of table and its variables

Custom properties that contain metadata of a table and its variables.
By default, this is an empty container. Each custom property holds
either table metadata or per-variable metadata, according to the property
type ( 'table' or 'variable' ) specified when the property
is created with the addprop method. A variable-scoped property
holds one element per variable.

You can add an individual custom property only by using the
addprop method and you can only remove a custom property with the
rmprop method. To access existing custom properties use dot name
structure assignment as in
tbl .Properties.CustomProperties. PropertyName , where
PropertyName is the name used with the addprop method.

The whole set may also be taken from another table by assigning that
table&rsquo;s CustomProperties to this one, which replaces every
custom property with those of the other table, their types included. A
variable-scoped property arriving that way must hold one element for
each variable of the receiving table, or be a 0-by-0 empty. Nothing
else can be assigned there.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Customized metadata of table and its variables



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
table.Description


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 303
tabular: property Description

Table description

Table description specified as a character vector or a string scalar.
If specified as a string scalar, it is converted and stored internally
as a character vector. You can access the Description property
of a table tbl with tbl .Properties.Description .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
Table description



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
table.DimensionNames


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 654
tabular: property DimensionNames

Dimension names

Dimension names specified as a two-element cell array of character
vectors or a two-element string array. If specified as a string array,
it is converted and stored internally as a cell array of character
vectors. You can access the DimensionNames property of a table
tbl with tbl .Properties.DimensionNames .

By default, DimensionNames is specified as
'Row', 'Variables' . You can access table data per rows or per
columns by using either one of the two dimension names, respectively.
However, if the table contains row names, then the first element of the
DimensionNames corresponds to the row names.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
Dimension names



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
table.RowNames


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 556
table: property RowNames

Row names

Row names, specified as a cell array of character vectors or a string
array. If specified as a string array, it is converted and stored
internally as a cell array of character vectors. If not empty (default),
it must contain the same number of elements as the number of rows in the
table. All elements must be nonempty and distinct. You can access the
rows of the table tbl by specifying one or more row names within
parentheses or curly braces. You can also set RowNames by
dot name assignment to an existing variable.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
Row names



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
table.UserData


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 248
tabular: property UserData

Additional table information

Additional table information, specified as an array. Any type of data
can be attached using this property. You can access the UserData
property of a table tbl with tbl .Properties.UserData .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Additional table information



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
table.VariableContinuity


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 940
tabular: property VariableContinuity

Variable continuity

Continuity of each variable, specified as a cell array of character
vectors or a string array carrying one element per variable, each of
them 'unset' , 'continuous' , 'step' or
'event' . It is empty by default, and assigning {} or
[] clears it. If specified as a string array, it is converted
and stored internally as a cell array of character vectors. You can
access it with tbl .Properties.VariableContinuity and you
can index individual variables to read or assign their continuity.

A table carries the property but does not act on it, which is
also how MATLAB behaves. A timetable uses it to choose the
default fill method of each variable when resampling.

MATLAB stores this property as a matlab.tabular.Continuity
enumeration. Octave has no enumeration classes, so it is stored and
returned here as a cell array of character vectors, as
VariableNames and VariableUnits are.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
Variable continuity



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
table.VariableDescriptions


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 867
tabular: property VariableDescriptions

Variable descriptions

Variable descriptions, specified as a cell array of character vectors or
a string array. If specified as a string array, it is converted and
stored internally as a cell array of character vectors. If not empty
(default), it must contain the same number of elements as the number of
variables. If a specific variable does not have a description, this can
be specified with an individual empty character vector or an empty
string. You can access the VariableDescriptions property of a
table tbl with tbl .Properties.VariableDescriptions .
You can further index specific variables to access their description.
Assigning an empty cell or string array returns the property to its
default, and describing a single variable of a table that has no
descriptions gives the remaining variables an empty description.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
Variable descriptions



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
table.VariableNames


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 555
tabular: property VariableNames

Variable names

Variable names, specified as a cell array of character vectors or a
string array. If specified as a string array, it is converted and stored
internally as a cell array of character vectors. All elements must be
nonempty and distinct, and their number must equal the number of
variables. You can access the data type of a specific variable by using
dot name assignment, as in tbl . varname , where
varname is the name of the variable in table tbl . If the
variable name does not exist, a new one is created.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
Variable names



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
table.VariableTypes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 703
tabular: property VariableTypes

Variable data types

The class of the data of each variable, defined as a cell array of
character vectors or a string array with the same number of elements as
the number of variables in the table. If specified as a string array,
it is converted and stored internally as a cell array of character
vectors. You can access the VariableTypes property of a table
tbl with tbl .Properties.VariableTypes . You can
further index specific variables to access their data type. Modifying
the elements of the VariableTypes property automatically converts
the underlying data of the corresponding variable into the specified
data types provided that a valid conversion is requested.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
Variable data types



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
table.VariableUnits


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 806
tabular: property VariableUnits

Variable units

Variable units, specified as a cell array of character vectors or a
string array. If specified as a string array, it is converted and stored
internally as a cell array of character vectors. If not empty (default),
it must contain the same number of elements as the number of variables.
If a specific variable does not have a unit, this can be specified with
an individual empty character vector or an empty string. You can access
the VariableUnits property of a table tbl with
tbl .Properties.VariableUnits . You can further index
specific variables to access their unit. Assigning an empty cell or
string array returns the property to its default, and giving a unit to
a single variable of a table that has none gives the remaining
variables an empty unit.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
Variable units



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.addprop


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1456
table: T = addprop ( T , propertyNames , propertyTypes )

Add custom properties to a table.

T = addprop ( T , propertyNames ,
propertyTypes ) adds properties that contain custom metadata to the
table T . The input argument propertyNames specifies the
names of the custom properties to be added and propertyTypes the
type of each corresponding custom property, that is whether the metadata
values contained in the property apply to table T as a whole, or
to the variables of T . Both propertyNames and
propertyTypes can be character vectors, cell arrays of character
vectors, or strings. When defined as cell arrays of character vectors or
strings, they must have the same number of elements.

Valid propertyTypes are either 'table' or
'variable' . When defined as 'table' , the custom property
can contain any value of any type and size, which applies as metadata to
the table as a whole and is stored exactly as it is given. When defined
as 'variable' , the custom property contains a vector with one
element per variable in the table.

A 'variable' property is cleared by assigning an empty 0-by-0
value, such as [] or {} , whatever the width of the
table; empty values of any other size are not accepted. A character
vector is not a valid value for a 'variable' property: use a
cell array of character vectors or a string array instead.

After adding custom properties using addprop , metadata values can
be assigned to the properties using dot syntax.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Add custom properties to a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.addvars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1709
table: tblB = addvars ( tblA , var1 , &hellip;, varN )
table: tblB = addvars (&hellip;, 'After' , location )
table: tblB = addvars (&hellip;, 'Before' , location )
table: tblB = addvars (&hellip;, 'NewVariableNames' , newNames )

Add new variables to a table.

tblB = addvars ( tblA , var1 , &hellip;, varN )
adds new variables to the right of the last variable in table tblA .
Each of the arrays specified by the input arguments var1 ,
&hellip;, varN becomes a new variable and its name is derived from
the input argument&rsquo;s variable name or a default is created if the input
argument is not a variable itself. The input arrays can be of any data
type including a table as long as they have the same number of rows as
tblA .

tblB = addvars (&hellip;, 'After' , location )
adds the new variables after (i.e. to the right of) the table variable
specified in location , which can be a character vector, a string
scalar, a scalar integer value, or even a logical vector with
width ( tblA ) elements, as long as it indexes a single
variable in tblA .

tblB = addvars (&hellip;, 'Before' , location )
adds the new variables before (i.e. to the left of) the table variable
specified in location , which can be a character vector, a string
scalar, a scalar integer value, or even a logical vector with
width ( tblA ) elements, as long as it indexes a single
variable in tblA .

tblB = addvars (&hellip;, 'NewVariableNames' ,
newNames ) renames the new variables added from the previous
syntaxes according to the names specified by newNames , which can be
a character vector, a cell array of character vectors or a string array.
The number of names in newNames must be the same as the number of
added variables.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Add new variables to a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
table.anymissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 480
table: TF = anymissing ( tblA )

Determine if any table element is missing.

TF = anymissing ( tblA ) returns true if at
least one element in table tblA is missing, otherwise it returns
false . TF is a logical scalar value.

Missing values are defined according to the data type of each variable in
tblA :

NaN - double, single, duration and calendarDuration
NaT - datetime
<missing> - string
<undefined> - categorical
{''} - cell arrays of character vectors
'' - character arrays


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Determine if any table element is missing.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
table.cat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 576
table: tbl = cat ( dim , tbl1 , tbl2 , &hellip;)

Concatenate tables along the given dimension.

tbl = cat ( dim , tbl1 , tbl2 , &hellip;)
concatenates the input tables along dimension dim , which must be
either 1 or 2, since a table always has exactly two dimensions.

cat (1, &hellip;) concatenates vertically and is equivalent to
vertcat , whereas cat (2, &hellip;) concatenates
horizontally and is equivalent to horzcat . The same
requirements on variable names, row names and size apply, and a
0x0 operand that is not a character array takes no part in the
concatenation.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Concatenate tables along the given dimension.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
table.convertvars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1903
table: tblB = convertvars ( tblA , vars , dataType )

Convert table variables to specified data type.

tblB = convertvars ( tblA , vars , dataType )
converts the variables in tblA specified by vars to the
specified data type.

vars can be any of the following types.

a character vector specifying a single variable.
a cell array of character vectors specifying a single or multiple
variables.
a string array specifying a single or multiple variables.
a numeric array of integer values indexing the variables to be
converted.
a logical vector of the same length as the width of the table
tblA indexing as true the variables to be converted.
a vartype object used to create a subscript that selects
variables of a specified type.

dataType specifies the data type to convert those variables to. It
can either be a character vector defining the name of the data type to
convert to or a function handle, which will perform the conversion.
When specifying a name for data type conversion,
it can either be a one-argument constructor for the specified data type,
which must accept the selected variables&rsquo; current data types as input, or
an available method, which can be applied on selected variables&rsquo; current
data types. When specifying a function handle for applying a conversion
on selected variables, this function handle must accept a single input
argument and return in its output the same rows as the input argument.

Either way, each resulting variable must have the same number of rows as
the respective variable selected for conversion. However, depending on
the chosen type of conversion, the columns of the converted variable(s)
might differ. It is up to the user to ensure that the appropriate type
of conversion is performed. convertvars only checks the custom
function handles for returning the correct number of rows, which must
equal the number of rows of the input table, tblA .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Convert table variables to specified data type.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
table.empty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 732
table: tbl = table.empty ()
table: tbl = table.empty ( n )
table: tbl = table.empty ( r , v )
table: tbl = table.empty ( sz )

Create an empty table.

tbl = table.empty () returns a 0-by-0 table.

tbl = table.empty ( r , v ) returns a table with
r rows and v variables, at least one of which must be
zero. A table with rows but no variables keeps its height, so
table.empty (5, 0) answers 5 to height . A table with
variables but no rows names them Var1 to VarN and
gives each of them a double value, exactly as
table ( 'Size' , &hellip;) does.

tbl = table.empty ( sz ) takes the two dimensions
from the two-element vector sz , and table.empty ( n )
is the same as table.empty ( n , n ) .

See also:
table,
isempty ,
height ,
width


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Create an empty table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
table.fillmissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2701
table: tblB = fillmissing ( tblA , 'constant' , val )
table: tblB = fillmissing ( tblA , method )
table: tblB = fillmissing (&hellip;, Name , Value )
table: [ tblB , TF ] = fillmissing (&hellip;)

Fill missing entries of a table, variable by variable.

tblB = fillmissing ( tblA , 'constant' ,
val ) replaces the missing entries of each table variable with the
fill value val . val can be a scalar that is broadcast to
every targeted variable, a vector with one element per targeted
variable, or a cell array with one fill value per targeted variable.
The fill value of each variable must be compatible with that variable&rsquo;s
data type.

tblB = fillmissing ( tblA , method ) fills missing
entries using the gap-filling method method , which can be one of:

'previous'
Fill with the previous non-missing entry along each column.
'next'
Fill with the next non-missing entry along each column.
'nearest'
Fill with the nearest non-missing entry along each column. When two
non-missing entries are equidistant, the later (next) one is used.
'linear'
Fill by linear interpolation of the neighbouring entries that are not
missing. Numeric, logical, datetime and duration
variables can be interpolated; a targeted variable of any other type
raises an error.

The 'previous' , 'next' , and 'nearest' methods
operate on variables of any data type. Leading or trailing missing
entries that cannot be reached by the method are left missing.

The following Name / Value pairs are supported:

'DataVariables'
Restrict the operation to the indicated subset of table variables. The
value uses the same variable referencing as the rest of the table
methods. By default, every variable is targeted.
'EndValues'
Control how leading and trailing missing entries are filled, whatever
the fill method is. Leading entries are those before the first entry
that is not missing, and trailing entries those after the last. Valid
values are 'extrap' (default), which leaves them to the fill
method itself, 'none' , which leaves them missing,
'previous' , 'next' and 'nearest' , which take
the value of the nearest entry that is not missing on the side they
name and leave the other side missing, or a scalar constant, which must
be assignable to the variable it fills.

[ tblB , TF ] = fillmissing (&hellip;) also returns a
logical array TF with height ( tblA ) rows and one
column per table variable. TF (i,j) is true when an
entry of the j-th variable in the i-th row was missing and has been
filled.

Not yet supported: the 'spline' , 'pchip' ,
'makima' , 'movmean' , 'movmedian' ,
'mean' , 'median' , 'mode' , and 'knn'
methods, as well as the 'ReplaceValues' , 'MaxGap' ,
'SamplePoints' , and 'MissingLocations' options.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Fill missing entries of a table, variable by variable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
table.findgroups


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 754
table: G = findgroups ( T )
table: [ G , TID ] = findgroups ( T )

Find groups defined by the variables of a table.

G = findgroups ( T ) returns G , a column vector of
positive integer group numbers, with one element for each row of the
table T . Each variable of T acts as a grouping variable, and
the groups are the unique combinations of values across those variables,
sorted in ascending order. If N groups are found, every integer
between 1 and N labels a group. Rows holding a missing value
( NaN , NaT , <missing> , '' , or
<undefined> ) in any grouping variable are labelled NaN in
G .

[ G , TID ] = findgroups ( T ) also returns
TID , a table whose rows are the sorted unique combinations
identifying each group, with the same variables as T .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Find groups defined by the variables of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
table.groupcounts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1628
table: G = groupcounts ( T , groupvars )
table: G = groupcounts ( T , groupvars , groupbins )
table: G = groupcounts (&hellip;, Name , Value )

Count the number of rows in each group of a table.

G = groupcounts ( T , groupvars ) groups the rows
of the table T by the grouping variables groupvars and
returns the table G with one row per group, holding the grouping
variables, a GroupCount variable counting the rows in each group,
and a Percent variable giving each group&rsquo;s count as a percentage
of the total. groupvars selects the grouping variables by name,
index, logical vector, function handle, or vartype subscript.

The optional groupbins argument bins the grouping variables before
grouping, using bin edges, a number of equal-width bins, a
duration bin width, or a datetime calendar-unit keyword, or a cell
array with one scheme per grouping variable. A binned grouping variable
becomes a categorical and is renamed disc_<var> or
<unit>_<var> . See groupsummary for details.

Groups are the sorted unique combinations of grouping values. The
following Name / Value pairs are accepted:

'IncludeMissingGroups'
A logical scalar. When true (the default), rows holding a missing
value in a grouping variable form their own groups, sorted after the
non-missing groups. When false , such rows are excluded.
'IncludeEmptyGroups'
A logical scalar, false by default. When true , the unused
categories of a categorical or binned grouping variable contribute empty
groups with a GroupCount of 0 .
'IncludedEdge'
Either 'left' (the default) or 'right' , selecting which
edge of each bin is inclusive when groupbins is given.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Count the number of rows in each group of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
table.groupfilter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1729
table: G = groupfilter ( T , groupvars , method )
table: G = groupfilter ( T , groupvars , groupbins , method )
table: G = groupfilter (&hellip;, method , datavars )

Filter the rows of a table by a per-group condition.

G = groupfilter ( T , groupvars , method )
groups the rows of the table T by the grouping variables
groupvars , applies the filter function method to each group,
and returns the table G holding the rows that satisfy the
condition, in their original order and with all the variables of
T . groupvars selects the grouping variables by name, index,
logical vector, function handle, or vartype subscript.

method is a function handle applied to each group&rsquo;s slice of every
data variable. It must return either a logical scalar, which keeps or
drops the whole group, or a logical vector with one element per row of
the group, which keeps or drops the individual rows. A row is kept only
when the condition holds for it across all data variables.

G = groupfilter ( T , groupvars , method ,
datavars ) applies method only to the data variables selected
by datavars (named, indexed, logical, function handle, or
vartype subscript). By default every variable that is not a
grouping variable is a data variable.

Rows holding a missing value in a grouping variable form their own
groups, to which method is applied like any other group.

The optional groupbins argument bins the grouping variables before
grouping, using bin edges, a number of equal-width bins, a
duration bin width, or a datetime calendar-unit keyword, or a cell
array with one scheme per grouping variable; see groupsummary for
details. The 'IncludedEdge' Name-Value pair ( 'left' by
default, or 'right' ) selects which bin edge is inclusive.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Filter the rows of a table by a per-group condition.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
table.groupsummary


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3529
table: G = groupsummary ( T , groupvars )
table: G = groupsummary ( T , groupvars , groupbins )
table: G = groupsummary ( T , groupvars , groupbins , method )
table: G = groupsummary ( T , groupvars , groupbins , method , datavars )
table: G = groupsummary (&hellip;, Name , Value )

Compute summary statistics by group for the variables of a table.

G = groupsummary ( T , groupvars ) groups the rows
of the table T by the grouping variables groupvars and
returns the table G with one row per group, holding the grouping
variables and a GroupCount variable counting the rows in each
group. groupvars selects the grouping variables by name, index,
logical vector, function handle, or vartype subscript.

G = groupsummary ( T , groupvars , method )
also applies method to each data variable within each group and
appends the results to G . method is one of the method names
below, a function handle, or a cell array of method names andor
function handles:

'sum' , 'mean' , 'median' , 'mode'
'var' , 'std' , 'min' , 'max'
'range' , 'nnz'
Standard statistics, computed over numeric or logical data variables.
NaN values are omitted (as in MATLAB) for every named method
except 'nummissing' .
'nummissing'
The number of missing values in the group, supported for data variables
of any type.
'numunique'
The number of unique non-missing values in the group, supported for data
variables of any type.

A function handle is applied to each group&rsquo;s slice of each data variable
and must return a single row (its first dimension must be 1 ); it
receives the values with NaN included.

G = groupsummary ( T , groupvars , method ,
datavars ) applies method only to the data variables selected
by datavars (named, indexed, logical, function handle, or
vartype subscript). By default every variable that is not a
grouping variable is a data variable.

The computed variables of G are named <method>_<datavar> ,
e.g. mean_X ; results from a function handle are named
fun<n>_<datavar> , where n is the position of the handle
among the requested methods. When several methods are requested the
computed variables are ordered method first, then data variable.

The optional groupbins argument bins the grouping variables before
grouping. A binning scheme is one of: a vector of bin edges; a positive
integer number of equal-width bins spanning the data range; a
duration scalar giving a fixed bin width (for a datetime or
duration grouping variable); or, for a datetime grouping variable, a
calendar-unit keyword ( 'second' , 'minute' ,
'hour' , 'day' , 'week' , 'month' ,
'quarter' , 'year' , 'decade' , or
'century' ) that bins by that calendar period. A binned grouping
variable becomes a categorical and is renamed disc_<var> for edge,
bin-count, or width binning, or <unit>_<var> for calendar-unit
binning. Pass a cell array with one scheme per grouping variable to bin
them differently, or 'none' to leave a variable unbinned.

The following Name / Value pairs are accepted:

'IncludeMissingGroups'
A logical scalar. When true (the default), rows holding a missing
value in a grouping variable form their own groups, sorted after the
non-missing groups. When false , such rows are excluded.
'IncludeEmptyGroups'
A logical scalar, false by default. When true , the unused
categories of a categorical or binned grouping variable contribute empty
groups ( GroupCount 0 , 0 for 'sum' and
'nnz' , NaN otherwise).
'IncludedEdge'
Either 'left' (the default) or 'right' , selecting which
edge of each bin is inclusive when groupbins is given.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Compute summary statistics by group for the variables of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
table.grouptransform


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2517
table: G = grouptransform ( T , groupvars , method )
table: G = grouptransform ( T , groupvars , groupbins , method )
table: G = grouptransform (&hellip;, method , datavars )
table: G = grouptransform (&hellip;, Name , Value )

Transform the data variables of a table group by group.

G = grouptransform ( T , groupvars , method )
groups the rows of the table T by the grouping variables
groupvars , applies method to each data variable within each
group, and returns the table G with the transformed values, one
row per row of T and in the original order. groupvars
selects the grouping variables by name, index, logical vector, function
handle, or vartype subscript.

method is one of the transform names below or a function handle:

'zscore'
Center and scale each group to zero mean and unit standard deviation.
'norm'
Divide each group by its 2-norm.
'meancenter'
Subtract the group mean.
'rescale'
Rescale each group to the range [0, 1] .
'meanfill'
Replace missing values with the group mean.
'linearfill'
Fill missing values by linear interpolation within the group; leading and
trailing missing values are left unchanged.

For the named methods NaN values are omitted when computing the
group statistics. A function handle is applied to each group&rsquo;s slice of
each data variable and must return either a single row (broadcast to all
the group&rsquo;s rows) or a result with one row per row of the group.

G = grouptransform ( T , groupvars , method ,
datavars ) transforms only the data variables selected by
datavars (named, indexed, logical, function handle, or
vartype subscript). By default every variable that is not a
grouping variable is a data variable.

The following Name / Value pair is accepted:

'ReplaceValues'
A logical scalar. When true (the default), each data variable is
replaced by its transformed values. When false , the transformed
values are appended as new variables named <method>_<datavar>
( fun1_<datavar> for a function handle), leaving the originals in
place.
'IncludedEdge'
Either 'left' (the default) or 'right' , selecting which
edge of each bin is inclusive when groupbins is given.

Rows holding a missing value in a grouping variable form their own
groups, which are transformed like any other group. The optional
groupbins argument bins the grouping variables before grouping,
using bin edges, a number of equal-width bins, a duration bin
width, or a datetime calendar-unit keyword, or a cell array with one
scheme per grouping variable; see groupsummary for details.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Transform the data variables of a table group by group.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
table.head


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 763
table: head ( tbl )
table: head ( tbl , k )
table: out = head ( tbl , k )

Display or return the first k rows of a table.

head ( tbl ) displays the first eight rows of the table
tbl . If tbl has fewer than eight rows, then all rows are
displayed.

head ( tbl , k ) displays the first k rows of the
table tbl . k must be a real, nonnegative, integer scalar
value. If tbl has fewer than k rows, then all rows are
displayed, and k of zero displays none.

out = head ( tbl , k ) returns the first k
rows in a new table out instead of displaying them. If k is
omitted or empty, then it defaults to eight. If tbl has fewer than
k rows, then all available rows are returned.

The returned table preserves the variable names, row names, and all other
properties of tbl .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Display or return the first k rows of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
table.height


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 298
table: H = height ( tbl )

Number of rows in table.

H = height ( tbl ) returns the number of rows in the
table tbl as a scalar. It is the equivalent of
size ( tbl , 1) .

For an empty table, or a table created with zero rows, height
returns 0. The presence of row names does not affect the result.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
Number of rows in table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.horzcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 698
table: tbl = horzcat ( tbl1 , tbl2 , &hellip;)

Horizontal concatenation for tables.

tbl = horzcat ( tbl1 , tbl2 , &hellip;) merges
tables by horizontally concatenating them, provided that all input tables
have collectively unique variable names and the same number of rows.

Input tables that have row names must share the same unique set of row
names but not necessarily in the same order. When row names are present
in multiple input tables, their position is matched to the row names of
the first input table. Input tables without row names are concatenated
by position without re-indexing. Output table&rsquo;s Description and
UserData properties are assigned using the first non-empty value.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Horizontal concatenation for tables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
table.inner2outer


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1292
table: tblB = inner2outer ( tblA )

Invert the nested hierarchy of nested tables in a table.

tblB = inner2outer ( tblA ) finds the variables in
tblA that are themselves tables (nested tables) and returns a table
tblB in which the inner and outer levels of nesting are transposed.
The variables of the nested tables in tblA become the variables of
tblB , and the variables of tblA that contain the nested
tables become the variables of the nested tables in tblB . Any
variable in tblA that is not a nested table is copied unaltered
into tblB .

For example, if tblA has two variables A and B that
both contain nested tables with the variables X and Y , then
tblB has two variables X and Y , each containing a
nested table with the variables A and B . As a result, the
table variables tblA.A.X and tblA.B.X are regrouped into
tblB.X.A and tblB.X.B , while tblA.A.Y and
tblA.B.Y are regrouped into tblB.Y.A and tblB.Y.B .

The new variables of tblB are the union of the variable names of
the nested tables in tblA , placed at the position of the first
nested table. An inner variable name shared by more than one nested
table becomes a nested table in tblB grouping the corresponding
variables; an inner variable name held by a single nested table becomes
a plain variable carrying that column.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Invert the nested hierarchy of nested tables in a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
table.innerjoin


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2015
table: tbl = innerjoin ( tblL , tblR )
table: tbl = innerjoin ( tblL , tblR , Name , Value )
table: [ tbl , ixL , ixR ] = innerjoin (&hellip;)

Inner join between two tables by rows using key variables.

tbl = innerjoin ( tblL , tblR ) combines the tables
tblL and tblR by matching the values of their key
variables , which by default are the variables that share the same name
in both tables. Each row of tbl is formed by horizontally
concatenating a row of tblL with a row of tblR whose key
variables share the same combination of values. If m rows in
tblL and n rows in tblR share the same key
combination, then tbl contains all m&times;n pairings for that
combination. The rows of tbl are sorted by the values of the key
variables, and any row names are dropped.

By default tbl contains all the variables of tblL followed by
the non-key variables of tblR . Whenever a non-key variable name
appears in both tables, a suffix derived from each input&rsquo;s argument name
is appended to the conflicting names in tbl (for inputs named
tblL and tblR , the suffixes '_tblL' and
'_tblR' ; when an input has no name, '_left' and
'_right' are used).

tbl = innerjoin ( tblL , tblR , Name ,
Value ) customizes the join with the following options:

'Keys'
Variables to use as keys in both tables, given as variable names or
indices. It cannot be combined with 'LeftKeys' or
'RightKeys' .
'LeftKeys' , 'RightKeys'
Variables to use as keys in tblL and tblR , respectively, when
the key variables have different names. They must be specified together
and reference the same number of variables.
'LeftVariables' , 'RightVariables'
Variables of tblL and tblR to include in tbl . They may
include or exclude key variables. By default 'LeftVariables' is
all the variables of tblL and 'RightVariables' is the
non-key variables of tblR .

[ tbl , ixL , ixR ] = innerjoin (&hellip;) also
returns the row-index vectors ixL and ixR such that tbl
is the horizontal concatenation of tblL ( ixL , leftVars)
and tblR ( ixR , rightVars) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Inner join between two tables by rows using key variables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
table.intersect


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 796
table: tbl = intersect ( tblA , tblB )
table: tbl = intersect ( tblA , tblB , setOrder )
table: [ tbl , ixA , ixB ] = intersect (&hellip;)

Intersection of two tables by rows.

tbl = intersect ( tblA , tblB ) returns the set of
rows common to both tblA and tblB , with duplicate rows
removed. Both tables must have the same variable names, although not
necessarily in the same order; tbl keeps the variable order of
tblA . Rows are compared by their variable values only (row names
are ignored), and by default tbl is sorted by those values.

tbl = intersect ( tblA , tblB , setOrder )
controls the ordering of tbl , either 'sorted' (default) or
'stable' .

[ tbl , ixA , ixB ] = intersect (&hellip;) also
returns index vectors ixA and ixB such that tbl equals
tblA ( ixA ,:) and tblB ( ixB ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Intersection of two tables by rows.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
table.iscolumn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 215
table: TF = iscolumn ( tbl )

Test input table for being a column vector.

TF = iscolumn ( tbl ) returns true if the input
table tbl has a single variable. The number of columns within that
variable does not matter.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Test input table for being a column vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.isempty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 151
table: TF = isempty ( tbl )

Test input table for being empty.

For tables, isempty is true if the number of rows is 0 or the
number of variables is 0.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Test input table for being empty.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.isequal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1172
table: TF = isequal ( A , B )
table: TF = isequal ( A , B , &hellip;)

Test tables for equality.

TF = isequal ( A , B ) returns a logical scalar
TF , which is true when the tables A and B are
the same size, carry the same variable names, row names and metadata,
and each pair of corresponding variables holds equal values, and
false otherwise.

Variables are compared by value and not by class, exactly as
isequal compares arrays elsewhere, so a table holding
int8 ([1; 2]) equals one holding [1; 2] . The
VariableTypes property, which only restates those classes,
takes no part in the comparison. Every other property does: two
tables differing only in Description , UserData ,
VariableUnits , VariableDescriptions or a custom
property are not equal.

As with NaN , missing values are never equal, so a missing
element anywhere in either table makes the result false ; use
isequaln to treat missing values as equal.

Further tables may be supplied, as in isequal ( A , B ,
C , &hellip;) , in which case TF is true only when
all of them are equal to one another. Any argument that is not a
table, a timetable included, makes the result false rather
than raising an error.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Test tables for equality.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
table.isequaln


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 788
table: TF = isequaln ( A , B )
table: TF = isequaln ( A , B , &hellip;)

Test tables for equality, treating missing values as equal.

TF = isequaln ( A , B ) is identical to
isequal ( A , B ) except that missing values are
treated as equal to one another, in the same way that isequaln
treats NaN . It returns a logical scalar TF , which is
true when the tables are the same size, carry the same
variable names, row names and metadata, and each pair of corresponding
elements is either equal or missing in both, and false
otherwise.

Further tables may be supplied, as in isequaln ( A ,
B , C , &hellip;) , in which case TF is true
only when all of them are equal to one another. Any argument that is
not a table, a timetable included, makes the result false
rather than raising an error.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
Test tables for equality, treating missing values as equal.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
table.ismatrix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 119
table: TF = ismatrix ( tbl )

Test input table for being a matrix.

For tables, ismatrix is always true, by definition.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Test input table for being a matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
table.ismember


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 661
table: TF = ismember ( tblA , tblB )
table: [ TF , ixB ] = ismember ( tblA , tblB )

Find set members between two tables by rows.

TF = ismember ( tblA , tblB ) returns a logical
column vector TF with one element per row of tblA , where
TF (i) is true when the i -th row of tblA
also appears as a row of tblB . Both tables must have the same
variable names, although not necessarily in the same order, and rows are
compared by their variable values only (row names are ignored).

[ TF , ixB ] = ismember ( tblA , tblB ) also
returns a column vector ixB containing, for each row of tblA ,
the index of the lowest matching row in tblB , or 0 if there
is no match.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Find set members between two tables by rows.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
table.ismissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1907
table: TF = ismissing ( tbl )
table: TF = ismissing ( tbl , indicator )
table: TF = ismissing (&hellip;, 'OutputFormat' , outFmt )

Find missing values in table.

TF = ismissing ( tbl ) returns a logical array,
TF , with any true values corresponding to missing elements
in the input table tbl .

Missing values are defined according to the data type of each variable in
tbl :

NaN - double, single, duration and calendarDuration
NaT - datetime
<missing> - string
<undefined> - categorical
{''} - cell arrays of character vectors
'' - character arrays

TF = ismissing ( tbl , indicator ) also returns a
logical array, TF , with any true values corresponding to
elements in the input table tbl , which are equal to the values in
indicator . When specifying an indicator , all default missing
values are ignored. If you want to keep them, you need to define them in
indicator .

indicator can be either a vector of specific data type, in which
case all other data types in table tbl are ignored, or a cell array
containing mixed types of data types, in which case they match the data
types of the variables in table tbl . Missing values specified by
indicator also apply to nested tables.

Besides the explicit data type match between indicator and
tbl , the following additional data types matches apply.

double indicators match numeric and logical variables.
logical indicators match numeric and logical variables.
char and cellstr indicators match string variables.
char and string indicators match categorical
variables.

The output array TF has the same size as the input table tbl .

TF = ismissing (&hellip;, 'OutputFormat' ,
outFmt ) specifies whether TF is returned as a logical array
or as a table, which maintains the variable names and all other
information of the input table tbl . Specifying outFmt as
'logical' (default) returns a logical array. Specifying
outFmt as 'tabular' returns a table.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Find missing values in table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
table.isrow


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 141
table: TF = isrow ( tbl )

Test input table for being a row vector.

TF = isrow ( tbl ) returns true if the input
table tbl has a single row.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Test input table for being a row vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
table.isscalar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 165
table: TF = isscalar ( tbl )

Test input table for being a scalar.

TF = isscalar ( tbl ) returns true if the input
table tbl has a single row and a single variable.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Test input table for being a scalar.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
table.issortedrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4292
table: TF = issortedrows ( tblA )
table: TF = issortedrows ( tblA , 'RowNames' )
table: TF = issortedrows ( tblA , rowDimName )
table: TF = issortedrows ( tblA , vars )
table: TF = issortedrows ( tblA , &hellip;, direction )
table: TF = issortedrows (&hellip;, Name , Value )

Check if table rows are sorted accordingly.

TF = issortedrows ( tblA ) determines if the rows in
tblA are sorted in ascending order based on the values in the first
variable or subsequent variables if elements of the former are repeated.
TF is a logical scalar and it is true when
tblA == sortrows ( tblA ) or false otherwise.

TF = issortedrows ( tblA , 'RowNames')
determines if the rows in tblA are sorted according to its row
names. TF is true when tblA == sortrows
( tblA , 'RowNames') or false otherwise. If
tblA does not have row names, i.e. tblA.Properties.RowNames
is empty, then TF is true .

TF = issortedrows ( tblA , rowDimName ) determines
if the rows in table tblA are sorted along the first dimension,
rowDimName , which is the equivalent to the previous syntax, i.e.
according to its row names. For this syntax to work, rowDimName
must match the first element in tblA.Properties.DimensionNames ,
otherwise rowDimName is considered a variable name, as in the
following syntax. TF is true when tblA ==
sortrows ( tblA , rowDimName ) or false otherwise. If
tblA does not have row names, i.e. tblA.Properties.RowNames
is empty, then TF is true .

TF = issortedrows ( tblA , vars ) determines if the
rows in tblA are sorted by the elements in the variables specified
by vars , which can be a character vector (for a single variable) or
a cell array of character vectors or a string array (specifying a single
or multiple variables). If tblA has row names, then vars can
include the row names. Alternatively, vars can be a logical vector
or a numeric vector of real integers indexing the desired variables.
Positive integers specify an ascending order, whereas negative integers
specify a descending order for the referenced variables. You can also
index all available variables in tblA by passing a semicolon
character argument. This Octave-specific syntax facilitates the use of
the direction input argument when no particular variable needs to
be selected to sort on. Additionally, vars can be a
vartype object used to create a subscript that selects variables
of a specified type.

TF = issortedrows ( tblA , &hellip;, direction )
determines if the rows in tblA are sorted in the order specified by
direction for any of the previous syntaxes. direction can be
'ascend' or 'descend' , which is applied to all specified
variables or row names that sortrows operates on. direction
can also be a cell array of character vectors, whose elements are
'ascend' and 'descend' , where each element corresponds to
the specified variables and/or row names used for sorting the table.
The order specified by direction always takes precedence over the
order defined by a numerical vector of integers in vars .
direction must always be the 3rd input argument. If you want to
omit passing selected variables and allow sortrows to work on
consecutive variables until all ties are resolved, then you can leave the
second input argument empty, as in
sortrows ( tblA , {[]}, direction ) or pass a
colon argument for vars as in
sortrows ( tblA , {':'}, direction ) .

TF = issortedrows (&hellip;, Name , Value )
determines if the rows in tblA are sorted according the additional
parameters specifying the sorting of rows of a table with the following
Name-Value paired arguments.

'MissingPlacement' specifies the placement of missing
values with one of the following options: 'auto' places the
missing elements at the bottom for ascending order and at the top for
descending order; 'first' places missing elements at the top;
'last' places missing elements at the bottom.
'ComparisonMethod' specifies the element comparison method
with one of the following options: 'auto' sorts rows using the
real part for real numbers and the magnitude for complex numbers;
'real' sorts rows using the real part for both real and complex
numbers; 'abs' sorts rows using the magnitude for both real and
complex numbers. For complex numbers with equal magnitude, the phase
angle in the interval (-π, π] is further used to break ties.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Check if table rows are sorted accordingly.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.istable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
table: tf = istable ( tbl )

Return true if input is a table.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Return true if input is a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
table.isvector


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 162
table: TF = isvector ( tbl )

Test input table for being a vector.

TF = isvector ( tbl ) returns true if the input
table tbl has a single row or a single column.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Test input table for being a vector.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
table.join


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1952
table: tbl = join ( tblL , tblR )
table: tbl = join ( tblL , tblR , Name , Value )
table: [ tbl , ixR ] = join (&hellip;)

Combine two tables by rows using key variables.

tbl = join ( tblL , tblR ) combines tblL and
tblR by matching the values of their key variables , which by
default are the variables that share the same name in both tables.
tbl contains one row for each row of tblL , in the same order;
each is completed with the single row of tblR whose key variables
match. The key variables of tblR must contain unique combinations
of values, and every key combination in tblL must be present in
tblR .

By default tbl contains all the variables of tblL followed by
the non-key variables of tblR . Whenever a non-key variable name
appears in both tables, a suffix derived from each input&rsquo;s argument name
is appended to the conflicting names (for inputs named tblL and
tblR , the suffixes '_tblL' and '_tblR' ; when an
input has no name, '_left' and '_right' are used). The
row names of tblL , if any, are preserved.

tbl = join ( tblL , tblR , Name , Value )
customizes the join with the following options:

'Keys'
Variables to use as keys in both tables, given as variable names or
indices. It cannot be combined with 'LeftKeys' or
'RightKeys' .
'LeftKeys' , 'RightKeys'
Variables to use as keys in tblL and tblR , respectively, when
the key variables have different names. They must be specified together
and reference the same number of variables.
'LeftVariables' , 'RightVariables'
Variables of tblL and tblR to include in tbl . By
default 'LeftVariables' is all the variables of tblL and
'RightVariables' is the non-key variables of tblR .
'KeepOneCopy'
Names of non-key variables that occur in both tables for which only the
copy from tblL is kept (no suffix is added and the tblR copy
is dropped).

[ tbl , ixR ] = join (&hellip;) also returns the index
vector ixR that identifies, for each row of tbl , the matching
row of tblR .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Combine two tables by rows using key variables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
table.length


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
table: out = length ( tbl )

Length along longest dimension.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Length along longest dimension.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
table.mergevars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2390
table: tblB = mergevars ( tblA , vars )
table: tblB = mergevars ( tblA , vars , Name , Value )

Merge table variables into a single multicolumn variable.

tblB = mergevars ( tblA , vars ) combines the table
variables in tblA specified by vars to create a new
multicolumn variable in tblB . All other variables in tblA
are copied to tblB unaltered. By default, the name of the merged
variable in tblB takes the form VarN , where N is the
position of the first variable in tblA among those to be merged,
which is also the location of the merged variable in tblB .

Note that merging variables with a 'string' data type variable
will result in a multicolumn variable of 'string' data type, by
initially converting all other to-be-merged variables into
'string' data type.

vars can be any of the following types.

a character vector specifying a single variable.
a cell array of character vectors specifying a single or multiple
variables.
a string array specifying a single or multiple variables.
a numeric array of integer values indexing the variables to be
merged.
a logical vector of the same length as the width of the table
tblA indexing as true the variables to be merged.
a vartype object used to create a subscript that selects
variables of a specified type.

tblB = mergevars (&hellip;, Name , Value ) further
specifies additional parameters for merging table variables with the
following Name-Value paired arguments.

'NewVariableName' specifies the name of the merged variable
in tblB , which must be unique. 'NewVariableName' must be
either a cellstr or string scalar or a character vector.
'MergeAsTable' specifies whether the selected variables
should be merged into a multicolumn variable (default) or into a table
nested into a variable, which is useful for variables that cannot be
concatenated due to incompatible variable types. 'MergeAsTable'
must be either a boolean scalar or a numeric scalar value of 1
( true ) or 0 ( false ).

Nothing the merged variables carried about themselves survives: one
variable carries one unit, one description, one continuity and one
entry of a custom property describing the variables, and there is no
saying which of them the merged variable should take, so it takes
none: where the continuity is set at all, the merged variable&rsquo;s
reads 'unset' , and a property that was never set stays
unset. The remaining variables keep theirs.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
Merge table variables into a single multicolumn variable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
table.movevars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1499
table: tblB = movevars ( tblA , vars )
table: tblB = movevars (&hellip;, 'After' , location )
table: tblB = movevars (&hellip;, 'Before' , location )

Move variables in a table.

tblB = movevars ( tblA , vars ) moves the variables
specified by vars to the end of the input table tblA .

vars can be any of the following types.

a character vector specifying a single variable.
a cell array of character vectors specifying a single or multiple
variables.
a string array specifying a single or multiple variables.
a numeric array of integer values indexing the variables to be
moved.
a logical vector of the same length as the width of the table
tblA indexing as true the variables to be moved.
a vartype object used to create a subscript that selects
variables of a specified type.

tblB = movevars (&hellip;, 'After' , location )
moves the selected variables after (i.e. to the right of) the table
variable specified in location , which can be a character vector, a
string scalar, a scalar integer value, or even a logical vector with
width ( tblA ) elements, as long as it indexes a single
variable in tblA which is not selected by vars .

tblB = movevars (&hellip;, 'Before' , location )
moves the selected variables before (i.e. to the left of) the table
variable specified in location , which can be a character vector, a
string scalar, a scalar integer value, or even a logical vector with
width ( tblA ) elements, as long as it indexes a single
variable in tblA which is not selected by vars .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Move variables in a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
table.ndims


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 93
table: out = ndims ( tbl )

Number of table dimensions.

For tables, ndims (tbl) is always 2.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Number of table dimensions.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
table.numel


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 434
table: out = numel ( tbl )

Total number of elements in table.

out = numel ( tbl ) returns the number of elements in
the table, tbl , equivalent to prod (size ( tbl )) . A
table is treated as a two-dimensional container, so this is the number of
rows times the number of variables. Variables may themselves span
multiple columns, but numel only accounts for the number of rows
and the number of variables, not the underlying columns.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Total number of elements in table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
table.outerjoin


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2677
table: tbl = outerjoin ( tblL , tblR )
table: tbl = outerjoin ( tblL , tblR , Name , Value )
table: [ tbl , ixL , ixR ] = outerjoin (&hellip;)

Outer join between two tables by rows using key variables.

tbl = outerjoin ( tblL , tblR ) combines the tables
tblL and tblR by matching the values of their key
variables , which by default are the variables that share the same name
in both tables. Unlike innerjoin , an outer join also keeps the
rows of each table that have no match in the other table, filling the
variables taken from the non-matching table with missing values
( NaN , NaT , <undefined> , empty string, etc., as
appropriate). If m rows in tblL and n rows in
tblR share the same key combination, then tbl contains all
m&times;n pairings for that combination. The rows of tbl are
sorted by the values of the key variables and any row names are dropped.

By default tbl contains all the variables of tblL followed
by all the variables of tblR . Because the key variables are kept
from both tables, conflicting names receive a suffix derived from each
input&rsquo;s argument name (for inputs named tblL and tblR , the
suffixes '_tblL' and '_tblR' ; when an input has no name,
'_left' and '_right' are used). See 'MergeKeys'
to combine the keys into single columns instead.

tbl = outerjoin ( tblL , tblR , Name ,
Value ) customizes the join with the following options:

'Type'
The type of outer join: 'full' (default) keeps unmatched rows
from both tables, 'left' keeps all rows of tblL and only
matching rows of tblR , and 'right' keeps all rows of
tblR and only matching rows of tblL .
'MergeKeys'
A logical scalar (default false ). When true , each pair
of key variables is merged into a single variable that takes the value
from tblL where a matching left row exists and from tblR
otherwise. The merged variable is named after the left key when both
keys share the same name, or 'leftName_rightName' when their
names differ.
'Keys'
Variables to use as keys in both tables, given as variable names or
indices. It cannot be combined with 'LeftKeys' or
'RightKeys' .
'LeftKeys' , 'RightKeys'
Variables to use as keys in tblL and tblR , respectively,
when the key variables have different names. They must be specified
together and reference the same number of variables.
'LeftVariables' , 'RightVariables'
Variables of tblL and tblR to include in tbl . By
default all the variables of each table are included.

[ tbl , ixL , ixR ] = outerjoin (&hellip;) also
returns the row-index vectors ixL and ixR that identify the
row of tblL and tblR , respectively, corresponding to each
row of tbl . A zero indicates a row of tbl that has no
corresponding row in that table.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Outer join between two tables by rows using key variables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
table.pivot


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3482
table: P = pivot ( T , 'Columns' , colvars )
table: P = pivot ( T , 'Rows' , rowvars )
table: P = pivot (&hellip;, Name , Value )

Summarize tabular data in a pivoted table.

P = pivot ( T , 'Columns', colvars , 'Rows',
rowvars ) reshapes the table T into the pivoted table
P . The unique combinations of the grouping variables colvars
become the variables (columns) of P , the unique combinations of the
grouping variables rowvars become its rows, and each cell holds one
statistic computed over the rows of T that fall into that
row-and-column group. At least one of 'Columns' or
'Rows' is required; an omitted dimension collapses to a single
group. Each of colvars and rowvars selects variables by
name, index, or logical vector, and may name several variables.

Groups are the sorted unique combinations of the grouping values, with
the first variable varying slowest; a categorical variable groups by its
category order. Column variable names are taken from the grouping values
(e.g. 'true' / 'false' for a logical variable), joined
with '_' when several variables define the columns.

The following Name / Value pairs are accepted:

'DataVariable'
The single variable whose values are aggregated. When omitted, the cells
hold group counts.
'Method'
The aggregation applied to 'DataVariable' : one of
'count' , 'sum' , 'mean' , 'median' ,
'mode' , 'std' , 'var' , 'min' ,
'max' , 'range' , 'nummissing' ,
'numunique' , 'nnz' , 'percentage' ,
'none' , or a function handle. Named methods omit missing
values. The default is 'count' when no data variable is given
or the data variable is non-numeric, and 'sum' when it is
numeric. 'none' rearranges the data without aggregating and
requires at most one value per cell.
'IncludeMissingGroups'
A logical scalar, true by default. When true , rows
holding a missing value in a grouping variable form their own group,
sorted last; when false , such rows are excluded.
'IncludeEmptyGroups'
A logical scalar, false by default. When true , every
category of a categorical grouping variable contributes a group even
if it is unused in the data, so unused combinations appear as empty
cells.
'IncludeTotals'
A logical scalar, false by default. When true , a
'Total' marginal row and/or column holding the same statistic
computed over each margin is appended. Row labels are then placed in the
row names.
'RowLabelPlacement'
Either 'variable' (the default), which keeps the row grouping
variables as the leftmost variables of P , or 'rownames' ,
which places the row group labels in the RowNames property.
'ColumnsBinMethod' , 'RowsBinMethod'
A binning scheme applied to the 'Columns' or 'Rows'
grouping variables before pivoting: a vector of bin edges, a number of
equal-width bins, a duration bin width, or a datetime
calendar-unit keyword (see groupsummary ), or a cell array with one
scheme per variable. Each binned variable becomes a categorical. The
default 'none' applies no binning.
'IncludedEdge'
Either 'left' (the default) or 'right' , selecting which
edge of each bin is inclusive when a binning scheme is given.
'OutputFormat'
'flat' (default) names each output column after the joined column
grouping values ( lvl _ lvl ). 'nested' instead
groups two or more 'Columns' variables into nested tables: one
outer variable per level of the first column grouping variable, each a
nested table whose variables are the next grouping variable&rsquo;s
levels (recursively). A marginal-total column, if any, stays a flat
outer variable.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Summarize tabular data in a pivoted table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
table.removevars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 674
table: tblB = removevars ( tblA , vars )

Remove variables from a table.

tblB = removevars ( tblA , vars ) removes the
variables specified by vars from the input table tblA .

vars can be any of the following types.

a character vector specifying a single variable.
a cell array of character vectors specifying a single or multiple
variables.
a string array specifying a single or multiple variables.
a numeric array of integer values indexing the variables to be
removed.
a logical vector of the same length as the width of the table
tblA indexing as true the variables to be removed.
a vartype object used to create a subscript that selects
variables of a specified type.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Remove variables from a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
table.renamevars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 953
table: tblB = renamevars ( tblA , vars , newNames )

Rename variables in a table.

tblB = renamevars ( tblA , vars , newNames )
renames the selected variables in the table tblA specified by
vars using the names in newNames .

vars can be any of the following types.

a character vector specifying a single variable.
a cell array of character vectors specifying a single or multiple
variables.
a string array specifying a single or multiple variables.
a numeric array of integer values indexing the variables to be
renamed.
a logical vector of the same length as the width of the table
tblA indexing as true the variables to be renamed.
a vartype object used to create a subscript that selects
variables of a specified type.

newNames can either be a character vector (when renaming a single
variable) or a cell array of character vectors or a string array. The
number of names specified by newNames must match the number of
variables specified by vars .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Rename variables in a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.repelem


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 467
table: tblB = repelem ( tblA , rows , columns )

Replicate elements of a table.

Replicates each row of the input table tblA rows times and
each variable columns times, keeping the repeats of a row
together, in a similar fashion to how repelem applies to a
matrix. Each repeated variable takes a numbered name, x
becoming x , x_1 .

Both counts must be given. A table has exactly two dimensions, so a
lone count is not read as applying to both, as it is for a matrix.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Replicate elements of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
table.repmat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 250
table: tblB = repmat ( tblA , sz )
table: tblB = repmat ( tblA , rows , columns )

Repeat copies of a table.

Repeats copies of the input table tblA in a similar fashion
to how repmat applies to a matrix. Only two dimensions are
supported for tables.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Repeat copies of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
table.rmmissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1418
table: tbl = rmmissing ( tblA )
table: tbl = rmmissing (&hellip;, Name , Value )
table: [ tbl , TF ] = rmmissing (&hellip;)

Remove missing table elements by rows.

tbl = rmmissing ( tblA ) returns a table with the rows
of tblA that contain at least one missing value removed. Missing
values are determined per variable according to its data type
( NaN for numeric, NaT for datetime , <missing>
for string , <undefined> for categorical ,
{''} for cellstr, etc.), as reported by ismissing .

tbl = rmmissing (&hellip;, Name , Value )
customizes the operation with the following options:

'MinNumMissing'
A positive integer n (default 1 ). A row is removed only
when it has at least n variables with a missing value.
'DataVariables'
Restrict the search for missing values to the indicated subset of table
variables, using the same variable referencing as the other table
methods. Variables outside the subset are not inspected, but all
variables are kept in the output.
'MissingLocations'
Supply the missing-value locations explicitly instead of deriving them
with ismissing . The value is either a logical matrix with one row
per row of the input and one column per inspected variable, or a
table of logical variables whose names and sizes match the
inspected variables.

[ tbl , TF ] = rmmissing (&hellip;) also returns a logical
column vector TF , with one element per row of tblA , that is
true for each removed row.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Remove missing table elements by rows.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
table.rmprop


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 442
table: T = rmprop ( T , propertyNames )

Remove custom properties from a table.

T = rmprop ( T , propertyNames ) removes properties
that contain custom metadata from the table T . The input argument
propertyNames specifies the names of the custom properties to be
removed and it can either be a character vector, a cell array of
character vectors, or a string array. Names that do not match any
existing custom property are silently ignored.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Remove custom properties from a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
table.rowfun


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2320
table: B = rowfun ( func , A )
table: B = rowfun ( func , A , Name , Value , &hellip;)

Apply a function to each row of a table.

B = rowfun ( func , A ) applies the function
handle func to each row of the table A and returns the
results in the table B , which has one row for each row of A .
By default the value of each variable in the row is passed to func
as a separate input argument, and the output variables of B are
named Var1 , Var2 , and so on.

B = rowfun ( func , A , Name , Value ,
&hellip;) modifies the operation through the following
Name / Value pairs:

'InputVariables'
The variables of A that are passed to func , given as variable
names, indices, a logical vector, or a function handle. By default every
variable of A that is not a grouping variable is used.
'GroupingVariables'
One or more variables of A that define groups of rows. When
grouping variables are given, func is applied once to each group,
receiving the values of each input variable across the rows of the group;
B has one row per group and also includes the grouping variables
and a GroupCount variable. Rows with a missing value in any
grouping variable are omitted.
'OutputVariableNames'
The names of the output variables of B , one per output of
func .
'NumOutputs'
The number of output arguments to request from func . It defaults
to the number of 'OutputVariableNames' if those are given,
otherwise to 1 .
'SeparateInputs'
A logical scalar. When true (the default), the value of each
input variable is passed to func as a separate argument. When
false , the values of the row are horizontally concatenated and
passed as a single argument.
'ExtractCellContents'
A logical scalar. When true , the contents of cell-valued
variables are extracted before being passed to func . It defaults
to false .
'OutputFormat'
The format of B , one of 'auto' (the default, equivalent to
'table' ), 'table' , 'uniform' , or 'cell' .
For 'uniform' , every call to func must return scalars of
the same type, which are concatenated into an array. For 'cell'
the results are returned in a cell array. The 'uniform' and
'cell' formats return only the results of func .
'ErrorHandler'
A function handle that is called when func throws an error,
receiving a structure with fields identifier , message ,
and index followed by the inputs passed to func .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Apply a function to each row of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
table.rows2vars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2171
table: tblB = rows2vars ( tblA )
table: tblB = rows2vars ( tblA , Name , Value )

Reorient table by swapping rows into variables.

tblB = rows2vars ( tblA ) reorients the input table
tblA so that its rows become variables in the output table
tblB and the variables are swapped into rows and their names
are stored into a new variable at the beginning of the output table. If
the contents of tblA can be concatenated, then the corresponding
variables of tblB are arrays, otherwise they are cell arrays. If
the input table tblA contains RowNames , then those names
become the variable names of the output table tblB , otherwise the
variable names of tblB are generated automatically.
rows2vars cannot handle multicolumn variables or nested tables.

tblB = rows2vars (&hellip;, Name , Value ) further
specifies additional parameters for reorienting the table with the
following Name-Value paired arguments.

'DataVariables' specifies the variables from input table
tblA which will be reoriented. 'DataVariables' can be any
of the following types: a character vector specifying a single variable;
a cell array of character vectors or a string array specifying a single
or multiple variables; a numeric array of integer values specifying a
single or multiple variables; a logical vector of the same length as the
width of the input table specifying a single or multiple variables.
'VariableNamesSource' specifies a single variable that
contains the variable names for the output table. The values of the
selected variable must have a data type which can be converted to strings
and the number of unique names in the selected variable must match the
number of rows of the input table. 'VariableNamesSource' accepts
the same data types supported by 'DataVariables' as long as they
index a single variable, which, however, must not be specified by the
'DataVariables' Name-Value paired argument.
'VariableNamingRule' must be a character vector specifying
the rule for naming variables in the output table tblB . When set
to 'modify' (default), the variable names are modified so that
they are valid variable identifiers. When set to 'preserve' , the
original names are preserved.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Reorient table by swapping rows into variables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.setdiff


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 763
table: tbl = setdiff ( tblA , tblB )
table: tbl = setdiff ( tblA , tblB , setOrder )
table: [ tbl , ixA ] = setdiff (&hellip;)

Difference between two tables by rows.

tbl = setdiff ( tblA , tblB ) returns the set of
rows that are present in tblA but not in tblB , with duplicate
rows removed. Both tables must have the same variable names, although
not necessarily in the same order; tbl keeps the variable order of
tblA . Rows are compared by their variable values only (row names
are ignored), and by default tbl is sorted by those values.

tbl = setdiff ( tblA , tblB , setOrder )
controls the ordering of tbl , either 'sorted' (default) or
'stable' .

[ tbl , ixA ] = setdiff (&hellip;) also returns the index
vector ixA such that tbl equals
tblA ( ixA ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Difference between two tables by rows.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
table.setxor


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 830
table: tbl = setxor ( tblA , tblB )
table: tbl = setxor ( tblA , tblB , setOrder )
table: [ tbl , ixA , ixB ] = setxor (&hellip;)

Exclusive OR of two tables by rows.

tbl = setxor ( tblA , tblB ) returns the set of
rows that are present in either tblA or tblB but not in both,
with duplicate rows removed. Both tables must have the same variable
names, although not necessarily in the same order; tbl keeps the
variable order of tblA . Rows are compared by their variable values
only (row names are ignored), and by default tbl is sorted by those
values.

tbl = setxor ( tblA , tblB , setOrder )
controls the ordering of tbl , either 'sorted' (default) or
'stable' .

[ tbl , ixA , ixB ] = setxor (&hellip;) also returns
index vectors ixA and ixB such that tbl is the
vertical concatenation of tblA ( ixA ,:) and
tblB ( ixB ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Exclusive OR of two tables by rows.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
table.size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 525
table: sz = size ( tbl )
table: dim_sz = size ( tbl , dim )
table: dim_sz = size ( tbl , vecdim )
table: [ rows , columns ] = size ( tbl )
table: [ rows , columns , &hellip;] = size ( tbl )

Return the size of a table.

For tables, the size is [number-of-rows x number-of-variables].
This is the same as [height(obj), width(obj)] .

size ( tbl , dim ) returns the size along dimension
dim ; dimensions greater than 2 have size 1. dim may be a
vector vecdim , in which case a row vector of the corresponding
sizes is returned.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Return the size of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
table.sortrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4084
table: tblB = sortrows ( tblA )
table: tblB = sortrows ( tblA , 'RowNames' )
table: tblB = sortrows ( tblA , rowDimName )
table: tblB = sortrows ( tblA , vars )
table: tblB = sortrows ( tblA , &hellip;, direction )
table: tblB = sortrows (&hellip;, Name , Value )
table: [ tblB , index ] = sortrows (&hellip;)

Sort the rows of a table.

tblB = sortrows ( tblA ) sorts the rows in tblA in
ascending order based on the values in the first variable. If elements
in the first variable are repeated, then sortrows sorts by the
elements in the second variable, and so on.

tblB = sortrows ( tblA , 'RowNames') sorts the
table tblA according to its row names. If tblA does not
have row names, i.e. tblA.Properties.RowNames is empty, then it
returns tblA .

tblB = sortrows ( tblA , rowDimName ) also sorts
the table tblA along the first dimension, rowDimName , which
is the equivalent to the previous syntax, i.e. according to its row
names. If tblA does not have row names, that is
tblA.Properties.RowNames is empty, then it returns tblA .
For this syntax to work, rowDimName must match the first element in
tblA.Properties.DimensionNames , otherwise rowDimName is
considered a variable name, as in the following syntax.

tblB = sortrows ( tblA , vars ) sorts the rows in
table tblA by the elements in the variables specified by
vars , which can be a character vector (for a single variable) or a
cell array of character vectors or a string array (specifying a single or
multiple variables). If tblA has row names, then vars can
include the row names. Alternatively, vars can be a logical vector
or a numeric vector of real integers indexing the desired variables.
Positive integers specify an ascending order, whereas negative integers
specify a descending order for the referenced variables. You can also
index all available variables in tblA by passing a semicolon
character argument. This Octave-specific syntax facilitates the use of
the direction input argument when no particular variable needs to
be selected to sort on. Additionally, vars can be a
vartype object used to create a subscript that selects variables
of a specified type.

tblB = sortrows ( tblA , &hellip;, direction ) sorts
the rows in table tblA in the order specified by direction
for any of the previous syntaxes. direction can be
'ascend' or 'descend' , which is applied to all specified
variables or row names that sortrows operates on. direction
can also be a cell array of character vectors, whose elements are
'ascend' and 'descend' , where each element corresponds to
the specified variables and/or row names used for sorting the table.
The order specified by direction always takes precedence over the
order defined by a numerical vector of integers in vars .
direction must always be the 3rd input argument. If you want to
omit passing selected variables and allow sortrows to work on
consecutive variables until all ties are resolved, then you can leave the
second input argument empty, as in
sortrows ( tblA , {[]}, direction ) or pass a
colon argument for vars as in
sortrows ( tblA , {':'}, direction ) .

tblB = sortrows (&hellip;, Name , Value ) specifies
additional parameters for sorting rows of a table with the following
Name-Value paired arguments.

'MissingPlacement' specifies the placement of missing
values with one of the following options: 'auto' places the
missing elements at the bottom for ascending order and at the top for
descending order; 'first' places missing elements at the top;
'last' places missing elements at the bottom.
'ComparisonMethod' specifies the element comparison method
with one of the following options: 'auto' sorts rows using the
real part for real numbers and the magnitude for complex numbers;
'real' sorts rows using the real part for both real and complex
numbers; 'abs' sorts rows using the magnitude for both real and
complex numbers. For complex numbers with equal magnitude, the phase
angle in the interval (-π, π] is further used to break ties.

[ tblB , index ] = sortrows (&hellip;) also returns an
index vector such that tblB = tblA ( index ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Sort the rows of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
table.splitapply


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 859
table: Y = splitapply ( func , T , G )
table: [ Y1 , &hellip;, YM ] = splitapply ( func , T , G )

Split table data into groups and apply a function to each group.

Y = splitapply ( func , T , G ) splits the
rows of the table T into groups according to the group numbers
G (typically produced by findgroups ), applies the function
handle func to each group, and concatenates the per-group results
into the output Y . G must be a column vector of positive
integers with one element per row of T ; if it identifies N
groups, every integer between 1 and N must occur at least once.
Rows for which G is NaN are omitted. Each variable of
T is passed to func as a separate input argument, so
func must accept as many arguments as T has variables.

[ Y1 , &hellip;, YM ] = splitapply (&hellip;) returns the
multiple outputs of func , each concatenated across groups.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
Split table data into groups and apply a function to each group.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
table.splitvars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1895
table: tblB = splitvars ( tblA )
table: tblB = splitvars ( tblA , vars )
table: tblB = splitvars (&hellip;, 'NewVariableNames' , NewNames )

Split multicolumn variables in a table.

tblB = splitvars ( tblA ) splits multicolumn variables
in tblA so that they are single-column variables in tblB ,
while all single-column variables in tblA are copied to tblB
unaltered. Each newly created single-column variable in tblB is
uniquely named by joining the name of its parent multicolumn variable in
tblA and the corresponding column number. If a variable in
tblA contains a table, then each variable of this nested table is
returned as a newly created variable in tblB . By default, these
variables retain their original name in the nested table, unless there
are duplicate names, in which case the name of the nested table is also
used. If the nested table in tblA contains a multicolumn variable,
then the newly created variable in tblB is also multicolumnar.

tblB = splitvars ( tblA , vars ) splits only the
variables in tblA specified by vars . If left empty, it
defaults to all variables that can be split. Single-column variables
specified in vars are copied unaltered.

vars can be any of the following types.

a character vector specifying a single variable.
a cell array of character vectors specifying a single or multiple
variables.
a string array specifying a single or multiple variables.
a numeric array of integer values indexing the variables to be
split.
a logical vector of the same length as the width of the table
tblA indexing as true the variables to be split.
a vartype object used to create a subscript that selects
variables of a specified type.

tblB = splitvars (&hellip;, 'NewVariableNames' ,
NewNames ) assigns new names to the variables that are split out of
tblA and copied to tblB . NewNames can be specified as
a cell array of character vectors and/or string arrays.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Split multicolumn variables in a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.squeeze


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 186
table: tblB = squeeze ( tblA )

Remove singleton dimensions.

For tables, this is always a no-op that returns the input table
unmodified, because tables always have exactly 2 dimensions.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Remove singleton dimensions.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
table.stack


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2962
table: tblB = stack ( tblA , vars )
table: tblB = stack ( tblA , { vars1 , &hellip;, varsN })
table: tblB = stack (&hellip;, Name , Value )
table: [ tblB , idxA ] = stack (&hellip;)

Stack multiple table variables into a single table variable.

tblB = stack ( tblA , vars ) stacks the values from
the variables vars in input tblA into a single variable in
output table tblB . By default, the stacked variable in tblB
is named by joining the names of the variables in tblA as defined
by vars , and it inherits the units and description of the first
variable in vars . Additionally, a new categorical variable is
included in tblB that indicates which variable in tblA the
stacked data in each row of tblB comes from. By default, this
categorical variable is named by appending '_Indicator' to the
name of the stacked variable. Variables in tblA that are not
defined in vars for stacking are replicated in tblB . If
tblA contains RowNames , these are not stacked.

tblB = stack ( tblA , { vars1 , &hellip;,
varsN }) stacks multiple groups of variables, given as a cell
array of variable references, producing one stacked data variable in
tblB per group (each named and metadata-inherited from its own
group). All groups must contain the same number of variables. In this
case a single indicator variable, named 'Indicator' by default,
holds the numeric position within each group of the source variable for
each stacked value.

vars can be any of the following types.

a character vector specifying a single variable.
a cell array of character vectors specifying a single or multiple
variables.
a string array specifying a single or multiple variables.
a numeric array of integer values indexing the variables to be
stacked.
a logical vector of the same length as the width of the table
tblA indexing as true the variables to be stacked.
a vartype object used to create a subscript that selects
variables of a specified type.

tblB = stack (&hellip;, Name , Value ) further
specifies additional parameters for stacking table variables with the
following Name-Value paired arguments.

'ConstantVariables' specifies the variables other than
vars to include in the output table. By default, all remaining
variables not specified by vars are included in the output table.
Specifying 'ConstantVariables' allows you to select specific
variables to replicate in tblB . Row names in tblA are always
replicated in tblB . You can specify 'ConstantVariables' in
the same manner as with vars .
'NewDataVariableName' specifies the name for the new data
variable in the output table tblB . It can be a character vector,
a string scalar, or a cellstring scalar.
'IndexVariableName' specifies the name for the new
indicator variable in the output table tblB . It can be a character
vector, a string scalar, or a cellstring scalar.

[ tblB , idxA ] = stack (&hellip;) also returns an index
vector, idxA , indicating the correspondence between the rows in
tblB and the rows in tblA .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
Stack multiple table variables into a single table variable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
table.standardizeMissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1243
table: tblB = standardizeMissing ( tblA , indicator )
table: tblB = standardizeMissing (&hellip;, Name , Value )

Insert standard missing values into a table.

tblB = standardizeMissing ( tblA , indicator )
replaces every entry of tblA that matches a value in
indicator with the standard missing value of that variable&rsquo;s data
type ( NaN for double / single , '' for cell
arrays of character vectors, <missing> for string , and
<undefined> for categorical ).

indicator may be a numeric scalar or vector, a character vector, a
string array, a cell array of character vectors, or a cell array
mixing numeric and text indicators. Each indicator is applied only to
the variables whose type is compatible with it: numeric indicators match
double and single variables, while text indicators (char,
string , or cellstr) match cell-array-of-character-vector,
string , and categorical variables.

The 'DataVariables' Name / Value pair restricts the
operation to a subset of variables, using the same variable referencing
as the other table methods. Variables not selected pass through
unchanged.

Logical and integer variables (which have no standard missing value) and
duration , datetime , and calendarDuration variables
pass through unchanged.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Insert standard missing values into a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.summary


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1359
table: summary ( tbl )
table: s = summary ( tbl )

Print a summary of a table.

summary ( tbl ) prints the description from
tbl .Properties.Description followed by a summary of each
table variable&rsquo;s values and their properties as defined in
tbl .Properties.VariableUnits and
tbl .Properties.VariableDescriptions .

s = summary ( tbl ) returns a structure, s , that
contains a summary of the input table, tbl . Each field of s
is a structure that summarizes the values in the corresponding variable
of tbl . Where applicable, the number of missing values is reported
in a NumMissing field and printed when it is greater than zero.

For numerical variables of double , single or any
int type, it prints the minimum, median, and maximum values. For
multicolumnar numerical variables it prints the minimum, median, and
maximum values for each column separately.
For variables of logical type, it prints the occurrences
of True and False .
For variables of type datetime and duration it
prints the minimum, median, and maximum values, computed after excluding
any missing ( NaT or NaN ) elements.
For variables of type calendarDuration , which are not
totally ordered, only the size, the type, and the number of missing
values are reported.
For variables of type cellstr , cell ,
string , categorical , and struct it prints the
size and the type of variable.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Print a summary of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
table.table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1776
table: tbl = table ( var1 , var2 , &hellip;, varN )
table: tbl = table ( 'Size' , sz , 'VariableTypes' , varTypes )
table: tbl = table (&hellip;, 'VariableNames' , varNames )
table: tbl = table (&hellip;, 'RowNames' , rowNames )
table: tbl = table (&hellip;, 'DimensionNames' , dimNames )

Create a new table.

tbl = table ( var1 , var2 , &hellip;, varN )
creates a new table with the given variables. The variables passed as
input arguments become the variables of the table. Their names are
automatically detected from the input variable names that you used.

tbl = table ( 'Size' , sz ,
'VariableTypes' , varTypes ) creates a new table of the
given size, sz , and with the given variable types, varTypes .
sz must be a two-element numeric array, where sz (1)
specifies the number of rows and sz (2) specifies the
number of variables. The variables will contain the default value for
elements of that type.

tbl = table (&hellip;, 'VariableNames' ,
varNames ) specifies the variable names to use in the constructed
table. varNames must be either a cell array of character vectors
or a string array with the same number of nonempty and unique elements as
the number of table variables.

tbl = table (&hellip;, 'RowNames' , rowNames )
specifies the row names to use in the constructed table. rowNames
must be either a cell array of character vectors or a string array with
the same number of nonempty and unique elements as the number of rows in
the table.

tbl = table (&hellip;, 'DimensionNames' ,
dimNames ) specifies the dimension names to use in the constructed
table. dimNames must be either a two-element cell array of
character vectors or a two-element string array with nonempty and unique
elements.

tbl = table () returns an empty table with 0 rows and 0
variables.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
Create a new table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
table.table2array


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
table: A = table2array ( tbl )

Converts a table to a homogeneous array.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Converts a table to a homogeneous array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
table.table2cell


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1031
table: C = table2cell ( tbl )

Converts a table to a cell array.

Each variable in tbl becomes a column of cells in the output
C . Multicolumnar variables are returned in a single column with
each cell element containing a row vector.

The size of the returned cell array, C , is the same as the input
table, tbl . The output C does not include any of the table&rsquo;s
properties. This also applies to row names.

Compatibility Notes:

Variables of types categorical , calendarDuration ,
datetime , duration and string are returned as
in their printed representation as character vectors. To revert them to
their original class type you can parse the cell elements to the
respective object constructor.

Nested tables are handled as multicolumnar variables only if they contain
data types, which can be converted to homogeneous array, i.e. numerical
logical values. Other data types will result to a warning due to
implicit conversion from numeric to char and the returned values will
not contain all values from the nested table.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Converts a table to a cell array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
table.table2csv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2626
table: table2csv ( tbl , file )
table: table2csv ( tbl , file , Name , Value )

Write a table to a comma-separated-value (CSV) file.

table2csv ( tbl , file ) writes the table tbl to
file , which may be a character vector, a cellstr, or a string
scalar. The resulting file can be read back with csv2table .

The file begins with a comment line reporting how many consecutive rows
hold the variable types, names, descriptions, and units, in that order.
Those header rows are followed by one row of data per table row.

Variables are serialized as follows:

Numeric and logical variables are written as numbers (logicals as
0 / 1 ). Missing and infinite values are written as the
tokens NaN , NA , inf , and -inf .

Character, cellstr, and string variables are written as quoted
text. A char matrix is one column of text, each row written
whole so that its padding survives. A missing string , and every
entry of a missing variable, is written as an empty unquoted
field, which says that there is no value where "" says the value
is an empty string.

datetime and duration variables are written in ISO 8601
form, which is exact whatever their display format; the format itself is
recorded alongside the variable type, so that it is restored on read.
calendarDuration and categorical variables are written as
their display strings.

A multicolumn variable is split into consecutive columns that share the
same variable name.

A nested table is split into columns tagged with both the outer and the
nested variable name. A structure is split into one column per field,
tagged with the variable name and the field name.

When tbl has row names they are written under a leading
RowNames column. A row of variable descriptions and a row of
variable units are written whenever the corresponding property is set,
or a nested variable carries one; a property that was never set writes
no row at all, so that it reads back unset.

The following Name - Value options are supported:

Name Value
'WriteVariableNames' A logical scalar specifying
whether the variable names are written (default true ). When
false the file carries none, so csv2table numbers the
variables on read and can no longer group the columns: a multicolumn
variable comes back as separate variables and a nested table as flat
columns.
'WriteRowNames' A logical scalar specifying whether
the row labels are written as a leading column (default true ).

Note the following round-trip limitation when reading the file back
with csv2table : calendarDuration and categorical
variables are returned as cell arrays of character vectors and their
values are not reconstructed.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Write a table to a comma-separated-value (CSV) file.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
table.table2ods


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3184
table: table2ods ( tbl , file )
table: table2ods ( tbl , file , Name , Value )

Write a table to an OpenDocument spreadsheet file.

table2ods ( tbl , file ) writes the table tbl to
file , which may be a character vector, a cellstr, or a string
scalar. When file ends in .ods a compressed (ZIP-packaged)
OpenDocument spreadsheet is written; when it ends in .fods a flat
(single-XML) OpenDocument spreadsheet is written instead. The resulting
file can be read back with ods2table .

The data sheet (named Sheet1 by default) is headed by the
variable names and then carries one natively typed cell per value, and a
hidden __datatypes_meta__ sheet carries the variable types,
descriptions and units needed to restore the exact Octave types on
read-back. The names are on the data sheet, where anyone opening the
file can see them, and a nested table takes one header row per nesting
level. Variables map to ODS cell types as follows:

Numeric variables become float cells and logical variables become
boolean cells. Integers are written with their exact digits.

datetime variables become native date cells and
duration variables become native time cells, both encoded
as ISO 8601 strings.

Character, cellstr, string , categorical , and
calendarDuration variables become string cells.

A multicolumn variable is split into consecutive columns that share the
same variable name.

Missing values ( NaN , NaT , and missing strings) are written
as empty cells. When tbl has row names they are written under a
leading RowNames column. A row of variable descriptions and a
row of variable units are written whenever the corresponding property is
set; a property that was never set writes no row at all, so that it
reads back unset. A zone-aware datetime
variable keeps its TimeZone on read-back.

The following Name - Value options are supported:

Name Value
'Sheet' The name of the sheet to write (default
'Sheet1' ). When file already exists the named sheet is
added or replaced while every other sheet is preserved, so a workbook can
be built up one table at a time.
'WriteVariableNames' A logical scalar specifying
whether the variable names are written (default true ). When
false the file carries none at all, the hidden metadata sheet
included, so ods2table numbers the variables on read and can no
longer group the columns: a multicolumn variable comes back as separate
variables and a nested table as flat columns.
'WriteRowNames' A logical scalar specifying whether
the row labels are written as a leading column (default true ).
'WriteMode' 'overwritesheet' or
'inplace' replace the sheet (the default when the sheet exists),
'append' appends the table&rsquo;s rows to it, and
'replacefile' discards any existing file.

A nested table is split into columns tagged with both the outer and the
nested variable name, and a structure into one column per field, exactly
as table2csv does; the tagging rows live on the hidden metadata
sheet, so the data sheet stays flat. Note the following round-trip
limitation when reading the file back with ods2table :
calendarDuration and categorical variables are returned as
cell arrays of character vectors and their values are not reconstructed.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Write a table to an OpenDocument spreadsheet file.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
table.table2struct


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 555
table: S = table2struct ( tbl )
table: S = table2struct ( tbl , 'ToScalar' , true )

Converts a table to a scalar structure or structure array.

S = table2struct ( tbl ) returns a structure array with
the same fields as the variables in tbl . The length of S is
the same as the height of tbl .

S = table2struct ( tbl , 'ToScalar' ,
true ) returns a scalar structure with the same fields as the
variables in tbl . Each field has the same rows as the tbl .

The output S does not include any of the table&rsquo;s properties. This
also applies to row names.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Converts a table to a scalar structure or structure array.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
table.table2timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1390
table: tt = table2timetable ( tbl )
table: tt = table2timetable ( tbl , 'RowTimes' , rowTimes )
table: tt = table2timetable ( tbl , 'TimeStep' , dt )
table: tt = table2timetable ( tbl , 'SampleRate' , fs )
table: tt = table2timetable (&hellip;, 'StartTime' , t0 )

Convert a table to a timetable.

tt = table2timetable ( tbl ) converts the table
tbl to a timetable, taking its row times from the first
variable that is a datetime or a duration . That
variable stops being a variable and becomes the row times, and the row
dimension is named after it. A table with no such variable cannot be
converted this way.

tt = table2timetable ( tbl , 'RowTimes' ,
rowTimes ) says which times to use. rowTimes may be a
datetime or duration vector with one element per row, in
which case every variable of tbl is kept and the row dimension is
named 'Time' ; or it may name one of the variables, by name or by
index, which is then taken as the row times exactly as above.

tt = table2timetable ( tbl , 'TimeStep' ,
dt ) and tt = table2timetable ( tbl ,
'SampleRate' , fs ) generate the row times instead, keeping
every variable. 'StartTime' sets the time of the first row for
either, and the row dimension is named 'Time' .

The row names of tbl , if it has any, are not carried over: a
timetable labels its rows by time and by nothing else.

See also:
timetable2table,
array2timetable,
timetable,
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Convert a table to a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
table.tail


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 759
table: tail ( tbl )
table: tail ( tbl , k )
table: out = tail ( tbl , k )

Display or return the last k rows of a table.

tail ( tbl ) displays the last eight rows of the table
tbl . If tbl has fewer than eight rows, then all rows are
displayed.

tail ( tbl , k ) displays the last k rows of the
table tbl . k must be a real, nonnegative, integer scalar
value. If tbl has fewer than k rows, then all rows are
displayed, and k of zero displays none.

out = tail ( tbl , k ) returns the last k
rows in a new table out instead of displaying them. If k is
omitted or empty, then it defaults to eight. If tbl has fewer than
k rows, then all available rows are returned.

The returned table preserves the variable names, row names, and all other
properties of tbl .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Display or return the last k rows of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
table.topkrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4393
table: tblB = topkrows ( tblA , k )
table: tblB = topkrows ( tblA , k , 'RowNames' )
table: tblB = topkrows ( tblA , k , rowDimName )
table: tblB = topkrows ( tblA , k , vars )
table: tblB = topkrows ( tblA , k , &hellip;, direction )
table: tblB = topkrows (&hellip;, Name , Value )
table: [ tblB , index ] = topkrows (&hellip;)

Return the top rows of a table.

tblB = topkrows ( tblA , k ) returns the top
k rows from table tblA sorted in descending order based on
all of its variables. If elements in the first variable are repeated,
then topkrows sorts by the elements in the second variable, and so
on.

tblB = topkrows ( tblA , k , 'RowNames') returns
the top k rows from table tblA sorted according to its row
names. If tblA does not have row names, i.e.
tblA.Properties.RowNames is empty, then it returns tblA .

tblB = topkrows ( tblA , k , rowDimName ) also
returns the top k rows from table tblA sorted along its first
dimension, rowDimName , which is the equivalent to the previous
syntax, i.e. according to its row names. If tblA does not have row
names, i.e. tblA.Properties.RowNames is empty, then it returns
tblA . For this syntax to work, rowDimName must match the
first element in tblA.Properties.DimensionNames , otherwise
rowDimName is considered a variable name, as in the following
syntax.

tblB = topkrows ( tblA , k , vars ) returns
the top k rows from table tblA sorted by the elements in the
variables specified by vars , which can be a character vector (for a
single variable) or a cell array of character vectors or a string array
(specifying a single or multiple variables). If tblA has row
names, then vars can include the row names. Alternatively,
vars can be a logical vector or a numeric vector of real integers
indexing the desired variables. Unlike sortrows , positive
integers specify a descending order, whereas negative integers specify an
ascending order for the referenced variables, consistent with the
descending default of topkrows . You can also index all available
variables in tblA by passing a semicolon character argument. This
Octave-specific syntax facilitates the use of the direction input
argument when no particular variable needs to be selected to sort on.
Additionally, vars can be a vartype object used to create a
subscript that selects variables of a specified type.

tblB = topkrows ( tblA , k , &hellip;,
direction ) returns the top k rows from table tblA
sorted in the order specified by direction for any of the previous
syntaxes. direction can be 'ascend' or 'descend' ,
which is applied to all specified variables or row names that
sortrows operates on. direction can also be a cell array of
character vectors, whose elements are 'ascend' and
'descend' , where each element corresponds to the specified
variables and/or row names used for sorting the table. The order
specified by direction always takes precedence over the order
defined by a numerical vector of integers in vars . direction
must always be the 3rd input argument. If you want to omit passing
selected variables and allow sortrows to work on consecutive
variables until all ties are resolved, then you can leave the second
input argument empty, as in
sortrows ( tblA , {[]}, direction ) or pass a
colon argument for vars as in
sortrows ( tblA , {':'}, direction ) .

tblB = topkrows (&hellip;, k , Name , Value )
returns the top k rows from table tblA sorted with any of the
previous syntaxes and further specified by additional parameters for
sorting rows of a table with the following Name-Value paired arguments.

'MissingPlacement' specifies the placement of missing
values with one of the following options: 'auto' places the
missing elements at the bottom for ascending order and at the top for
descending order; 'first' places missing elements at the top;
'last' places missing elements at the bottom.
'ComparisonMethod' specifies the element comparison method
with one of the following options: 'auto' sorts rows using the
real part for real numbers and the magnitude for complex numbers;
'real' sorts rows using the real part for both real and complex
numbers; 'abs' sorts rows using the magnitude for both real and
complex numbers. For complex numbers with equal magnitude, the phase
angle in the interval (-π, π] is further used to break ties.

[ tblB , index ] = topkrows (&hellip;) also returns an
index vector such that tblB = tblA ( index ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Return the top rows of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
table.union


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 885
table: tbl = union ( tblA , tblB )
table: tbl = union ( tblA , tblB , setOrder )
table: [ tbl , ixA , ixB ] = union (&hellip;)

Union of two tables by rows.

tbl = union ( tblA , tblB ) returns the combined
set of rows of tblA and tblB , with duplicate rows removed.
Both tables must have the same variable names, although not necessarily
in the same order; tbl keeps the variable order of tblA .
Rows are compared by their variable values only (row names are ignored),
and by default tbl is sorted by those values.

tbl = union ( tblA , tblB , setOrder )
controls the ordering of tbl . setOrder is either
'sorted' (default) for ascending order, or 'stable' to
keep the order in which the rows appear in tblA and tblB .

[ tbl , ixA , ixB ] = union (&hellip;) also returns
the index vectors ixA and ixB such that tbl is the
vertical concatenation of tblA ( ixA ,:) and
tblB ( ixB ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Union of two tables by rows.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
table.unique


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1161
table: tblB = unique ( tblA )
table: tblB = unique ( tblA , setOrder )
table: tblB = unique ( tblA , occurrence )
table: [ tblB , ixA , ixB ] = unique (&hellip;)

Unique rows in a table.

tblB = unique ( tblA ) returns the unique rows of table
tblA in sorted order.

tblB = unique ( tblA , setOrder ) returns the
unique rows of table tblA in a specified order. setOrder can
be either 'sorted' (default) or 'stable' .

'sorted' returns the unique rows sorted in ascending order.
'stable' returns the unique rows according to their order
of occurrence.

tblB = unique ( tblA , occurrence ) returns the
unique rows of table tblA according to their order of occurrence.
occurrence can be either 'first' (default) or
'last' .

'first' returns the first occurrence of each unique row,
i.e. the lowest possible indices are returned.
'last' returns the last occurrence of each unique row, i.e.
the highest possible indices are returned.

[ tblB , ixA , ixB ] = unique (&hellip;) also returns
index vectors ixA and ixB using any of the previous syntaxes.
ixA and ixB map the tables tblA and tblB to one
another such that tblB = tblA ( ixA ,:) and
tblA = tblB ( ixB ,:) .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Unique rows in a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.unstack


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4331
table: tblB = unstack ( tblA , vars , ivar )
table: tblB = unstack (&hellip;, Name , Value )
table: [ tblB , idxA ] = unstack (&hellip;)

Unstack a single table variable into multiple table variables.

tblB = unstack ( tblA , vars , ivar ) unstacks
the values from the variables vars according to the indicator
variable ivar in input tblA into multiple variables in output
table tblB . The new (unstacked) variables in tblB are named
according to the unique values of the indicator variable and the rows
with matching indicator values are aggregated into the new (unstacked)
variables. By default, numeric and duration data types
are aggregated by summation, whereas from other data types the first
unique element of each group is returned.

vars may specify one or more variables of any data type supported
by the table class except for nested tables, whereas ivar
must only specify a single variable, which must be numeric, logical,
categorical, string, or cellstring. Both vars and ivar can
be specified as follows:

a character vector specifying a single variable.
a cell array of character vectors specifying a single or multiple
variables.
a string array specifying a single or multiple variables.
a numeric array of integer values indexing the variables to be
unstacked.
a logical vector of the same length as the width of the table
tblA indexing as true the variables to be unstacked.
a vartype object used to create a subscript that selects
variables of a specified type.

By default, all remaining variables in tblA which are not specified
by vars and ivar are treated as grouping variables, in which
case each unique combination of values in the grouping variables
identifies a group of rows in tblA that is unstacked into one row
of tblB .

tblB = unstack (&hellip;, Name , Value ) further
specifies additional parameters for unstacking table variables with the
following Name-Value paired arguments.

'GroupingVariables' specifies the variables that should be
used as grouping variables. All valid schemes for indexing a table
variable can be used. If grouping variables have missing values, the
data from corresponding rows are not aggregated in the output table.
Table row names cannot be assigned as a grouping variable, since these
must be unique for each row, which would defeat the purpose of unstacking
a table onto itself.
'ConstantVariables' specifies the variables that are
constant within each group. All valid schemes for indexing a table
variable can be used. The values for these variables in the output are
taken from the first row in each group in the input. By default, no
variable is treated as constant unless specified. However, if the input
table has row names, these effectively are treated as constant variables.
'NewDataVariableNames' specifies the names for the new data
variables in the output table tblB . It can be a character vector,
a string scalar, or a cellstring scalar. By default, the names of the
new unstacked data variables are based on the string representation of
the unique values in the indicator variable ivar . If multiple
variables are unstacked, then unstack generates composite names
using both the values from the indicator variable and the name of the
variable being unstacked. The number of names must match the number of
unique values in the indicator variable.
'AggregationFunction' specifies a function handle used to
aggregate each group&rsquo;s data into a single value. By default,
@sum is applied on numeric data, whereas @unique is
applied on all other supported data types, including duration and
calendarDuration . In the latter case, if a group contains more
than one distinct value for the same indicator value, the default
aggregation errors, and an explicit 'AggregationFunction' that
returns a scalar must be specified.
'VariableNamingRule' , specified as either 'modify'
or 'preserve' , defines the rule for naming the new unstacked
variables in the output table tblB . 'modify' (default)
forces all variable names to be valid Octave variable names.
'preserve' preserves the original names taken from the input
table, which can have any Unicode characters, including spaces and
non-ASCII characters.

[ tblB , idxA ] = unstack (&hellip;) also returns an index
vector, idxA , indicating the correspondence between the rows in
tblB and the rows in tblA .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Unstack a single table variable into multiple table variables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
table.varfun


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1940
table: B = varfun ( func , A )
table: B = varfun ( func , A , Name , Value , &hellip;)

Apply a function to each variable of a table.

B = varfun ( func , A ) applies the function
handle func separately to each variable of the table A and
returns the results in the table B . func is called once per
variable with that variable as its single input argument. By default
each output variable of B is named f _ v , where
f is the name of func (or Fun when func is
anonymous) and v is the name of the corresponding variable of
A .

B = varfun ( func , A , Name , Value ,
&hellip;) modifies the operation through the following
Name / Value pairs:

'InputVariables'
The variables of A to which func is applied, given as
variable names, indices, a logical vector, or a function handle that
returns true for the variables to include. By default func
is applied to every variable of A that is not a grouping variable.
'GroupingVariables'
One or more variables of A that define groups of rows. When
grouping variables are given, func is applied to the values of each
input variable within each group, B has one row per group, and
B also includes the grouping variables and a GroupCount
variable holding the number of rows in each group. Rows with a missing
value in any grouping variable are omitted.
'OutputFormat'
The format of B , one of 'auto' (the default, equivalent to
'table' ), 'table' , 'uniform' , or 'cell' .
For 'uniform' , func must return a scalar on each call and
the results are concatenated into an array. For 'cell' the
results are returned in a cell array. The 'uniform' and
'cell' formats return only the results of func , without the
grouping variables or GroupCount .
'ErrorHandler'
A function handle that is called when func throws an error. It
receives a structure with fields identifier , message , and
index , followed by the same inputs that were passed to
func , and its outputs are used in place of the outputs of
func .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Apply a function to each variable of a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
table.vertcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 693
table: tbl = vertcat ( tbl1 , tbl2 , &hellip;)

Vertical concatenation for tables.

tbl = vertcat ( tbl1 , tbl2 , &hellip;) merges
tables by vertically concatenating them, provided that all input tables
have the same variable names but not necessarily in the same order. The
positions of the variable names are matched to those of the first input
table.

When any input table has row names, they must be unique across all input
tables. In such a case, rows coming from input tables without row names
are assigned default Row N names, where N is the row&rsquo;s
position in the output table. Output table&rsquo;s Description and
UserData properties are assigned using the first non-empty value.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Vertical concatenation for tables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
table.width


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 456
table: W = width ( tbl )

Number of variables in table.

W = width ( tbl ) returns the number of variables in the
table tbl as a scalar. It is the equivalent of
size ( tbl , 2) .

Note that this is the number of table variables, not the total number of
columns. A single variable may itself contain several columns (for
example, a matrix-valued variable), but it still counts as one towards
the table width.

For a table with no variables, width returns 0.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Number of variables in table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
table.writetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3218
table: writetable ( tbl , filename )
table: writetable ( tbl , filename , Name , Value )

Write a table to a file in a MATLAB-compatible format.

writetable ( tbl , filename ) writes the table tbl
to filename . The file type is inferred from the extension:
.txt , .csv , and .dat are written as delimited
text; .ods as an OpenDocument spreadsheet; and .xlsx and
.xlsm as Excel spreadsheets. Use the 'FileType' option
to override the inferred type.

Unlike table2csv / table2ods , no type metadata is written:
the file holds only an optional variable-name header row followed by the
data, so it can be read by other applications. Type information is
recovered by readtable through automatic detection (text) or the
native cell types (spreadsheet).

.ods is the OpenDocument spreadsheet format, an open standard
that LibreOffice and other applications read and write on every
platform. MATLAB is the exception and cannot be given one.
Its writetable refuses the extension, and its readers open an
OpenDocument file only by handing it to Excel, so a MATLAB user without
Excel cannot read one at all. A file written for a MATLAB user should
therefore be .csv or .xlsx . Everywhere else the format
is a good choice, and table2ods writes it losslessly.

The following options are supported:

Name Value
'FileType' 'text' or 'spreadsheet' .
'WriteVariableNames' Logical; write the variable names
as the first row (default true ).
'WriteRowNames' Logical; write the row names as the
first column (default false ).
'Delimiter' Field delimiter for text files: a single
character or one of 'comma' , 'space' , 'tab' ,
'semi' , 'bar' (default ',' ).
'QuoteStrings' 'minimal' , 'all' , or
'none' for text files (default 'minimal' ).
'Sheet' Spreadsheet only: the name of the sheet to
write. The default is the first sheet of an existing workbook, or
'Sheet1' for a new file.
'Range' Spreadsheet only: an A1-style anchor such as
'C5' at which to place the top-left corner of the data (fresh
writes only).
'WriteMode' For text: 'overwrite' (default) or
'append' . For spreadsheets: 'overwritesheet' /
'inplace' (replace the target sheet), 'append' (append
rows to it), or 'replacefile' (overwrite the whole file).

When the target spreadsheet already exists, the sheet named by
'Sheet' (defaulting to the first existing sheet) is added or
replaced while every other sheet is preserved, unless 'WriteMode'
is 'replacefile' . For ODS, existing foreign spreadsheets (for
example those written by LibreOffice) are updated in place, keeping their
other parts; for Excel ( .xlsx , .xlsm ) the workbook is
read back and rewritten, so only its cell values are preserved.

Dates written to Excel use its 1900 serial date system, which counts a
29 February 1900 that never existed: 1900-03-01 is serial 61, and every
earlier date is one less than its plain day count. That system has no
serial below 0 (1899-12-31), so any earlier date is written as text
rather than as a date, as MATLAB does. MATLAB spells that text in the
datetime display format; here it is written in ISO 8601 form.

Nested tables and structures are not supported, and the legacy binary
formats .xls and .xlsb are not supported either; use
.xlsx , .ods , or a text format.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Write a table to a file in a MATLAB-compatible format.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
tabular


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 565
datatypes: tabular

Abstract superclass of table and timetable .

tabular holds everything the two tabular classes share: their
common metadata properties, their variable storage, and the machinery
that does not depend on how rows are labelled. It is abstract and cannot
be instantiated; isa ( obj , "tabular") is true for both
table and timetable , and neither derives from the other.

Everything that does depend on row labels is reached through a small set
of hooks that each subclass implements: table labels its rows with
RowNames and timetable with RowTimes .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Abstract superclass of table and timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
tabular.CustomProperties


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1148
tabular: property CustomProperties

Customized metadata of table and its variables

Custom properties that contain metadata of a table and its variables.
By default, this is an empty container. Each custom property holds
either table metadata or per-variable metadata, according to the property
type ( 'table' or 'variable' ) specified when the property
is created with the addprop method. A variable-scoped property
holds one element per variable.

You can add an individual custom property only by using the
addprop method and you can only remove a custom property with the
rmprop method. To access existing custom properties use dot name
structure assignment as in
tbl .Properties.CustomProperties. PropertyName , where
PropertyName is the name used with the addprop method.

The whole set may also be taken from another table by assigning that
table&rsquo;s CustomProperties to this one, which replaces every
custom property with those of the other table, their types included. A
variable-scoped property arriving that way must hold one element for
each variable of the receiving table, or be a 0-by-0 empty. Nothing
else can be assigned there.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Customized metadata of table and its variables



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
tabular.Description


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 303
tabular: property Description

Table description

Table description specified as a character vector or a string scalar.
If specified as a string scalar, it is converted and stored internally
as a character vector. You can access the Description property
of a table tbl with tbl .Properties.Description .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
Table description



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
tabular.DimensionNames


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 654
tabular: property DimensionNames

Dimension names

Dimension names specified as a two-element cell array of character
vectors or a two-element string array. If specified as a string array,
it is converted and stored internally as a cell array of character
vectors. You can access the DimensionNames property of a table
tbl with tbl .Properties.DimensionNames .

By default, DimensionNames is specified as
'Row', 'Variables' . You can access table data per rows or per
columns by using either one of the two dimension names, respectively.
However, if the table contains row names, then the first element of the
DimensionNames corresponds to the row names.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
Dimension names



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
tabular.UserData


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 248
tabular: property UserData

Additional table information

Additional table information, specified as an array. Any type of data
can be attached using this property. You can access the UserData
property of a table tbl with tbl .Properties.UserData .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Additional table information



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
tabular.VariableContinuity


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 940
tabular: property VariableContinuity

Variable continuity

Continuity of each variable, specified as a cell array of character
vectors or a string array carrying one element per variable, each of
them 'unset' , 'continuous' , 'step' or
'event' . It is empty by default, and assigning {} or
[] clears it. If specified as a string array, it is converted
and stored internally as a cell array of character vectors. You can
access it with tbl .Properties.VariableContinuity and you
can index individual variables to read or assign their continuity.

A table carries the property but does not act on it, which is
also how MATLAB behaves. A timetable uses it to choose the
default fill method of each variable when resampling.

MATLAB stores this property as a matlab.tabular.Continuity
enumeration. Octave has no enumeration classes, so it is stored and
returned here as a cell array of character vectors, as
VariableNames and VariableUnits are.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
Variable continuity



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
tabular.VariableDescriptions


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 867
tabular: property VariableDescriptions

Variable descriptions

Variable descriptions, specified as a cell array of character vectors or
a string array. If specified as a string array, it is converted and
stored internally as a cell array of character vectors. If not empty
(default), it must contain the same number of elements as the number of
variables. If a specific variable does not have a description, this can
be specified with an individual empty character vector or an empty
string. You can access the VariableDescriptions property of a
table tbl with tbl .Properties.VariableDescriptions .
You can further index specific variables to access their description.
Assigning an empty cell or string array returns the property to its
default, and describing a single variable of a table that has no
descriptions gives the remaining variables an empty description.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
Variable descriptions



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
tabular.VariableNames


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 555
tabular: property VariableNames

Variable names

Variable names, specified as a cell array of character vectors or a
string array. If specified as a string array, it is converted and stored
internally as a cell array of character vectors. All elements must be
nonempty and distinct, and their number must equal the number of
variables. You can access the data type of a specific variable by using
dot name assignment, as in tbl . varname , where
varname is the name of the variable in table tbl . If the
variable name does not exist, a new one is created.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
Variable names



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
tabular.VariableTypes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 703
tabular: property VariableTypes

Variable data types

The class of the data of each variable, defined as a cell array of
character vectors or a string array with the same number of elements as
the number of variables in the table. If specified as a string array,
it is converted and stored internally as a cell array of character
vectors. You can access the VariableTypes property of a table
tbl with tbl .Properties.VariableTypes . You can
further index specific variables to access their data type. Modifying
the elements of the VariableTypes property automatically converts
the underlying data of the corresponding variable into the specified
data types provided that a valid conversion is requested.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
Variable data types



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
tabular.VariableUnits


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 806
tabular: property VariableUnits

Variable units

Variable units, specified as a cell array of character vectors or a
string array. If specified as a string array, it is converted and stored
internally as a cell array of character vectors. If not empty (default),
it must contain the same number of elements as the number of variables.
If a specific variable does not have a unit, this can be specified with
an individual empty character vector or an empty string. You can access
the VariableUnits property of a table tbl with
tbl .Properties.VariableUnits . You can further index
specific variables to access their unit. Assigning an empty cell or
string array returns the property to its default, and giving a unit to
a single variable of a table that has none gives the remaining
variables an empty unit.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
Variable units



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
timerange


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 351
datatypes: timerange

Subscript into a timetable by a range of times.

A utility class that selects the rows of a timetable whose times fall in
an interval. The interval is half-open by default, including the time it
starts at and excluding the one it ends at, so that ranges laid end to
end select each row exactly once.

See also:
withtol,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Subscript into a timetable by a range of times.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
timerange.hasEventBounds


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 111
timerange: tf = hasEventBounds ( tr )

Whether the range&rsquo;s bounds are event filters awaiting a timetable.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
Whether the range's bounds are event filters awaiting a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
timerange.interval


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 332
timerange: [ lo , hi , cl , cr ] = interval ( tr , rowTimes )

Return the interval the range describes, in the row times&rsquo; own type.

lo and hi come back as the class of rowTimes , or as
-Inf or Inf where the range is unbounded on that side.
cl and cr say whether the interval includes the bound at
its lower and its upper end.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Return the interval the range describes, in the row times' own type.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
timerange.resolveEventBounds


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 281
timerange: tr2 = resolveEventBounds ( tr , tt )

Return the range with its event filter bounds read against tt .

Each bound becomes the time of the first event of tt its filter
matches, so the range runs from the start of one event to the start of
the other and stops short of it.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Return the range with its event filter bounds read against tt.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
timerange.rowIndices


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 202
timerange: ix = rowIndices ( tr , rowTimes )

Return the positions in rowTimes the range selects.

The positions come back in ascending order, being the rows of the
timetable in the order it holds them.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
Return the positions in rowTimes the range selects.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
timerange.timerange


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1478
timerange: tr = timerange ( startTime , endTime )
timerange: tr = timerange ( startTime , endTime , intervalType )
timerange: tr = timerange ( t , unit )
timerange: tr = timerange ( startTime , endTime , unit )

Create a time range subscript.

tr = timerange ( startTime , endTime ) creates a
subscript selecting the rows of a timetable whose times are at or after
startTime and strictly before endTime . The bounds may be
datetime or duration scalars, text that reads as one, or
-Inf and Inf for no bound at that end; they may not both
be infinite, there being nothing to say what kind of time is meant.

tr = timerange ( startTime , endTime ,
intervalType ) says which bounds belong to the interval:
'openright' (the default) includes the start alone,
'openleft' the end alone, 'closed' both and
'open' neither.

tr = timerange ( t , unit ) covers the whole
calendar period containing t , one of 'seconds' ,
'minutes' , 'hours' , 'days' , 'weeks' ,
'months' , 'quarters' or 'years' , in the
singular or the plural. t must be a datetime : a
duration is elapsed time and sits on no calendar.

tr = timerange ( startTime , endTime ,
unit ) widens the range to whole periods of unit : it runs
from the start of the period holding startTime to the start of
the period after the one holding endTime , the far end left out
as usual. Both bounds must be datetime scalars. A unit and an
interval type cannot both be given, the unit fixing the ends itself.

See also:
withtol,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Create a time range subscript.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1894
datatypes: timetable

Array of tabular data whose rows are labelled by time.

A timetable collects heterogeneous data into columnar variables exactly
as a table does, but labels each of its rows with a time instead
of a name. The row times are a datetime or a duration
vector, one element per row, and they are what the type exists for: rows
can be selected, aligned and resampled by when they happened.

Unlike the row names of a table , the row times need not be unique,
sorted, or present; duplicates, a descending order and missing times are
all accepted and merely make the timetable irregular.

A timetable is regular when its rows are evenly spaced. The
spacing is reported by the TimeStep property and its reciprocal
SampleRate , and a timetable that is not evenly spaced reports a
NaN time step. A timetable told its step at construction, by
'TimeStep' or 'SampleRate' , remembers it even where a
subset is too short to imply one, so a single row taken out of it is
still hourly; one that read its step off the row times it was given has
nothing to fall back on and reports NaN there.

A timetable is not a table and neither is a subclass of the
other; both derive from the same abstract class, so istabular is
true for either while istable and istimetable each single
one of them out.

Assigning an empty matrix to a subscripted timetable deletes rows or
variables exactly as it does for a table , and the row times go
with the rows they label. The row times themselves cannot be deleted.

Besides the timetable constructor, you can also use
table2timetable and array2timetable to create timetables
from the respective data types.

eventtable derives from this class and inherits every method
documented here; where one of them behaves differently for an event
table, its own documentation says so.

See also:
table,
eventtable,
istimetable ,
istabular,
isregular ,
datetime,
duration


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Array of tabular data whose rows are labelled by time.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
timetable.CustomProperties


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1148
tabular: property CustomProperties

Customized metadata of table and its variables

Custom properties that contain metadata of a table and its variables.
By default, this is an empty container. Each custom property holds
either table metadata or per-variable metadata, according to the property
type ( 'table' or 'variable' ) specified when the property
is created with the addprop method. A variable-scoped property
holds one element per variable.

You can add an individual custom property only by using the
addprop method and you can only remove a custom property with the
rmprop method. To access existing custom properties use dot name
structure assignment as in
tbl .Properties.CustomProperties. PropertyName , where
PropertyName is the name used with the addprop method.

The whole set may also be taken from another table by assigning that
table&rsquo;s CustomProperties to this one, which replaces every
custom property with those of the other table, their types included. A
variable-scoped property arriving that way must hold one element for
each variable of the receiving table, or be a 0-by-0 empty. Nothing
else can be assigned there.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Customized metadata of table and its variables



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
timetable.Description


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 303
tabular: property Description

Table description

Table description specified as a character vector or a string scalar.
If specified as a string scalar, it is converted and stored internally
as a character vector. You can access the Description property
of a table tbl with tbl .Properties.Description .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
Table description



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
timetable.DimensionNames


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 654
tabular: property DimensionNames

Dimension names

Dimension names specified as a two-element cell array of character
vectors or a two-element string array. If specified as a string array,
it is converted and stored internally as a cell array of character
vectors. You can access the DimensionNames property of a table
tbl with tbl .Properties.DimensionNames .

By default, DimensionNames is specified as
'Row', 'Variables' . You can access table data per rows or per
columns by using either one of the two dimension names, respectively.
However, if the table contains row names, then the first element of the
DimensionNames corresponds to the row names.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
Dimension names



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
timetable.Events


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 924
timetable: property Events

Event table attached to this timetable

Event table attached to this timetable, specified as an
eventtable , or empty when no events are attached. A plain
timetable may be assigned and is converted, though no variable
of it is guessed to hold the event labels; assigning [] detaches
whatever was there. The event table&rsquo;s row times must be of the same
type as this timetable&rsquo;s, so a duration-keyed timetable takes a
duration-keyed event table and a datetime-keyed one takes a
datetime-keyed event table. Nothing requires the events to lie within
the span of the row times, and events entirely outside it are accepted.

An operation that preserves the rows carries the event table through
unchanged: it is never subsetted, filtered, re-timed or reordered along
with them.

An eventtable has no Events property of its own, an
event table not being something that can itself carry events.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Event table attached to this timetable



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
timetable.RowTimes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 521
timetable: property RowTimes

Row times

Row times, specified as a datetime or duration vector
with one element for each row of the timetable. They are stored as a
column vector whatever shape they are given in. Unlike the row names
of a table they need not be unique, sorted or present: duplicate
times, a descending order and missing times are all accepted, and each
of them merely makes the timetable irregular. You can access them
with tt .Properties.RowTimes and assign them the same
way, which recomputes TimeStep .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
Row times



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
timetable.SampleRate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 397
timetable: property SampleRate

Sampling rate in hertz

Sampling rate, specified as a positive numeric scalar, being the
reciprocal of TimeStep measured in seconds. It is
NaN whenever the time step is a calendarDuration ,
a calendar step having no fixed length in seconds, and whenever the
timetable is irregular. Assigning it regenerates the row times from
StartTime , as assigning TimeStep does.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Sampling rate in hertz



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
timetable.StartTime


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 340
timetable: property StartTime

Time of the first row

Time of the first row, of the same type as RowTimes . It
follows the first row: deleting the first row leaves StartTime
naming the row that is now first. A timetable left with no rows keeps
the value it had. Assigning it shifts every row time by the same
amount and preserves TimeStep .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
Time of the first row



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
timetable.TimeStep


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 803
timetable: property TimeStep

Spacing between row times

Spacing between consecutive row times, specified as a duration
or calendarDuration scalar, or a NaN duration when the
timetable is irregular. Two rows or more always imply a step of their
own and it is read off them afresh, so a subset with a gap in it steps
by nothing and a reversed one steps backwards. Fewer than two rows
imply nothing, and there it matters how the step was arrived at: one
given by 'TimeStep' or 'SampleRate' is remembered,
while one read off the row times is not and becomes NaN , its
class resetting to duration with it. A freshly built one-row
timetable has no step either way. A negative step is as regular as a
positive one. Assigning it regenerates the row times from
StartTime , even when the timetable was irregular.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Spacing between row times



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
timetable.UserData


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 248
tabular: property UserData

Additional table information

Additional table information, specified as an array. Any type of data
can be attached using this property. You can access the UserData
property of a table tbl with tbl .Properties.UserData .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Additional table information



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
timetable.VariableContinuity


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 940
tabular: property VariableContinuity

Variable continuity

Continuity of each variable, specified as a cell array of character
vectors or a string array carrying one element per variable, each of
them 'unset' , 'continuous' , 'step' or
'event' . It is empty by default, and assigning {} or
[] clears it. If specified as a string array, it is converted
and stored internally as a cell array of character vectors. You can
access it with tbl .Properties.VariableContinuity and you
can index individual variables to read or assign their continuity.

A table carries the property but does not act on it, which is
also how MATLAB behaves. A timetable uses it to choose the
default fill method of each variable when resampling.

MATLAB stores this property as a matlab.tabular.Continuity
enumeration. Octave has no enumeration classes, so it is stored and
returned here as a cell array of character vectors, as
VariableNames and VariableUnits are.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
Variable continuity



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
timetable.VariableDescriptions


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 867
tabular: property VariableDescriptions

Variable descriptions

Variable descriptions, specified as a cell array of character vectors or
a string array. If specified as a string array, it is converted and
stored internally as a cell array of character vectors. If not empty
(default), it must contain the same number of elements as the number of
variables. If a specific variable does not have a description, this can
be specified with an individual empty character vector or an empty
string. You can access the VariableDescriptions property of a
table tbl with tbl .Properties.VariableDescriptions .
You can further index specific variables to access their description.
Assigning an empty cell or string array returns the property to its
default, and describing a single variable of a table that has no
descriptions gives the remaining variables an empty description.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
Variable descriptions



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
timetable.VariableNames


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 555
tabular: property VariableNames

Variable names

Variable names, specified as a cell array of character vectors or a
string array. If specified as a string array, it is converted and stored
internally as a cell array of character vectors. All elements must be
nonempty and distinct, and their number must equal the number of
variables. You can access the data type of a specific variable by using
dot name assignment, as in tbl . varname , where
varname is the name of the variable in table tbl . If the
variable name does not exist, a new one is created.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
Variable names



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
timetable.VariableTypes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 703
tabular: property VariableTypes

Variable data types

The class of the data of each variable, defined as a cell array of
character vectors or a string array with the same number of elements as
the number of variables in the table. If specified as a string array,
it is converted and stored internally as a cell array of character
vectors. You can access the VariableTypes property of a table
tbl with tbl .Properties.VariableTypes . You can
further index specific variables to access their data type. Modifying
the elements of the VariableTypes property automatically converts
the underlying data of the corresponding variable into the specified
data types provided that a valid conversion is requested.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
Variable data types



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
timetable.VariableUnits


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 806
tabular: property VariableUnits

Variable units

Variable units, specified as a cell array of character vectors or a
string array. If specified as a string array, it is converted and stored
internally as a cell array of character vectors. If not empty (default),
it must contain the same number of elements as the number of variables.
If a specific variable does not have a unit, this can be specified with
an individual empty character vector or an empty string. You can access
the VariableUnits property of a table tbl with
tbl .Properties.VariableUnits . You can further index
specific variables to access their unit. Assigning an empty cell or
string array returns the property to its default, and giving a unit to
a single variable of a table that has none gives the remaining
variables an empty unit.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
Variable units



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
timetable.addprop


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 762
timetable: tt = addprop ( tt , propertyNames , propertyTypes )

Add custom properties to a timetable.

tt = addprop ( tt , propertyNames ,
propertyTypes ) adds properties that carry custom metadata to the
timetable tt . propertyNames names them, as a character
vector, a cell array of character vectors, or a string array, and
propertyTypes says what each one describes, one per name:
'table' for a property describing the timetable as a whole and
'variable' for one carrying an entry per variable, which is
kept in step as variables are added, removed, moved and renamed.

A property is added empty; assign it through
tt .Properties.CustomProperties. PropertyName . The
row times are not a variable and carry no entry of their own.

See also:
rmprop ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Add custom properties to a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
timetable.addvars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 952
timetable: ttB = addvars ( ttA , var1 , &hellip;, varN )
timetable: ttB = addvars (&hellip;, 'Before' , location )
timetable: ttB = addvars (&hellip;, 'After' , location )
timetable: ttB = addvars (&hellip;, 'NewVariableNames' , newNames )

Add variables to a timetable.

ttB = addvars ( ttA , var1 , &hellip;) appends
each array as a new variable at the right-hand end. Every one must
have as many rows as the timetable has.

Unnamed variables take the name of the workspace variable they came
from, or Var N where there is none. A name that would
collide with the row dimension is not allowed and one that arrives by
the workspace route is given a suffix instead.

'Before' and 'After' place the new variables beside an
existing one, named or numbered. The row times are not a variable and
cannot be used as the location, nor can position zero.

The row times are untouched, so the time step is unchanged.

See also:
removevars ,
movevars ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Add variables to a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
timetable.anymissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 365
timetable: TF = anymissing ( tt )

True when any variable of a timetable has a missing value.

TF = anymissing ( tt ) is any (ismissing
( tt )(:)) and reads the same thing: the variables, and not the
row times. A timetable whose only missing value is a row time
answers false here and still loses that row to rmmissing .

See also:
ismissing ,
rmmissing ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
True when any variable of a timetable has a missing value.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
timetable.cat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 348
timetable: tt = cat ( dim , tt1 , tt2 , &hellip;)

Concatenate timetables along a dimension.

tt = cat ( dim , tt1 , tt2 , &hellip;)
concatenates along dim , which must be 1 or 2: a timetable has
two dimensions and there is nothing to stack along a third.
cat (1, &hellip;) is vertcat and cat (2, &hellip;)
is horzcat .

See also:
vertcat ,
horzcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Concatenate timetables along a dimension.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
timetable.containsrange


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1357
timetable: TF = containsrange ( tt , ref )
timetable: [ TF , whichRows ] = containsrange ( tt , ref )

True when a timetable spans the whole of a range of times.

TF = containsrange ( tt , ref ) returns true when
every instant of ref lies inside the range of tt , that is
between its earliest and its latest row time, both included. The row
times need be neither sorted nor unique, since only the two ends of the
range are read, and missing row times take no part in it.

ref says what range is meant, in one of three ways. A
timerange gives its own bounds, and says at each end whether the
bound itself belongs to the range. A timetable gives the range
between its earliest and its latest row time, both ends included. A
datetime or duration scalar gives a single instant. A
reference whose times are of the other kind is refused: elapsed time
and a calendar cannot be compared.

[ TF , whichRows ] = containsrange (&hellip;) also
returns a column of logicals, one per row of tt , saying which of
its rows fall in ref . That answer is the same for all three
range predicates and is independent of TF : rows may fall in a
range the timetable does not contain.

A timetable whose row times are all missing has no range and answers
false, and so does a reference naming no instant, such as a NaT .

See also:
overlapsrange ,
withinrange ,
timerange,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
True when a timetable spans the whole of a range of times.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
timetable.convertvars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 494
timetable: ttB = convertvars ( ttA , vars , dataType )

Convert variables of a timetable to a given type.

ttB = convertvars ( ttA , vars , dataType )
converts each variable in vars , which may be named, numbered,
selected by a logical vector or picked out by a vartype .
dataType is a type name or a function handle that performs the
conversion.

The row times are not a data variable and cannot be converted; assign
to tt .Properties.RowTimes to change them.

See also:
renamevars ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Convert variables of a timetable to a given type.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
timetable.empty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 773
timetable: tt = timetable.empty ()
timetable: tt = timetable.empty ( n )
timetable: tt = timetable.empty ( r , v )
timetable: tt = timetable.empty ( sz )

Create an empty timetable.

tt = timetable.empty () returns a 0-by-0 timetable.

tt = timetable.empty ( r , v ) returns a
timetable with r rows and v variables, at least one of
which must be zero. The row times are NaT , one per row, since
a row of a timetable is labelled whether or not it holds anything. A
timetable with variables but no rows names them Var1 to
VarN and gives each of them a double value.

tt = timetable.empty ( sz ) takes the two dimensions
from the two-element vector sz , and
timetable.empty ( n ) is the same as
timetable.empty ( n , n ) .

See also:
timetable,
table,
isempty ,
height ,
width


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Create an empty timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
timetable.extractevents


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2613
timetable: et = extractevents ( tt , rows )
timetable: et = extractevents ( tt , labels )
timetable: et = extractevents (&hellip;, Name , Value )
timetable: [ et , tt2 ] = extractevents (&hellip;)

Build an event table out of the rows of a timetable.

et = extractevents ( tt , rows ) returns an
eventtable whose events happen at the times of the rows
rows picks out. rows is any row subscript a timetable
accepts: row numbers, a logical vector, row times, a timerange ,
a withtol or a colon. The events come out in the order the
subscript names them and a row named twice gives two events; with no
option saying otherwise the event table carries no variables at all
and designates nothing.

et = extractevents ( tt , labels ) takes a
categorical vector with one element per row of tt and
makes an event of every row whose label is not missing, labelled by
it. Consecutive rows sharing a label are not gathered into one
interval: each row is its own instantaneous event.

[ et , tt2 ] = extractevents (&hellip;) also returns
tt2 , a copy of tt without the variables the event table
took from it. Only variables named by 'EventDataVariables' or
by one of the three '&hellip;Variable' options are taken, so a
call that names none leaves tt2 exactly as tt was.

The following Name - Value options are supported:

Name Value
'EventLabels' A scalar, labelling every event
alike, or one value per event. Added as a variable named
EventLabels .
'EventLabelsVariable' The name of a variable of
tt holding the labels. It keeps its own name in the event
table and leaves tt2 .
'EventLengths' A duration or
calendarDuration , scalar or one per event, added as a variable
named EventLengths .
'EventLengthsVariable' The name of a variable of
tt holding the lengths, which must be a duration or
calendarDuration column.
'EventEnds' Scalar or one per event, of the same
type as the row times, added as a variable named EventEnds .
'EventEndsVariable' The name of a variable of
tt holding the end times, which must be a datetime or
duration column.
'EventDataVariables' Variables of tt to carry
into the event table as event data. Each keeps its own name.
'PreserveEventVariables' A logical scalar. When
true the variables the event table took stay in tt2 as
well. It says what to do with variables that were named, so it
requires at least one option that names some.

Lengths and ends are mutually exclusive, however they are given, and
so are labels given as values and labels named as a variable. Neither
labels option may be combined with the labels form, which
carries its own.

See also:
eventtable,
syncevents ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Build an event table out of the rows of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
timetable.fillmissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1442
timetable: ttB = fillmissing ( ttA , method )
timetable: ttB = fillmissing ( ttA , 'constant' , v )
timetable: ttB = fillmissing (&hellip;, Name , Value )
timetable: [ ttB , TF ] = fillmissing (&hellip;)

Fill the missing values of a timetable.

ttB = fillmissing ( ttA , method ) replaces each
missing value by one worked out from the values around it.
'previous' , 'next' and 'nearest' copy a
neighbouring value; 'linear' , 'spline' ,
'pchip' and 'makima' interpolate; and
'constant' takes the value given after it.

The row times are what the filling runs against , not the
order of the rows. A gap an hour after its left neighbour and two
hours before its right one is filled a third of the way between them
by 'linear' , and takes the left value under
'nearest' , where counting rows would put it midway and call
the two neighbours equally close. The row times are already the
sample points, so 'SamplePoints' is not accepted; a timetable
whose row times are not all known is refused outright rather than
filled around the gap.

'DataVariables' names the variables to fill and
'EndValues' says what to do with a gap that has no neighbour
on one side, taking 'extrap' , another method name, or a
constant.

[ ttB , TF ] = fillmissing (&hellip;) also returns a
logical array marking what was filled. The row times themselves are
never filled and the time step is unchanged.

See also:
ismissing ,
rmmissing ,
standardizeMissing ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Fill the missing values of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
timetable.findgroups


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 690
timetable: G = findgroups ( tt )
timetable: [ G , TID ] = findgroups ( tt )

Number the groups the rows of a timetable fall into.

G = findgroups ( tt ) returns a column of group
numbers, one per row of tt , numbering the distinct combinations
of its variables in sorted order. A row holding a missing value in any
variable belongs to no group and is numbered NaN .

The row times take no part: a timetable groups by its variables, as a
table does.

[ G , TID ] = findgroups ( tt ) also returns a
table with one row per group, holding the combination of values
that defines it. It is a table and not a timetable, its rows being
groups rather than instants.

See also:
splitapply ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Number the groups the rows of a timetable fall into.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
timetable.groupcounts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1758
timetable: G = groupcounts ( tt , groupvars )
timetable: G = groupcounts ( tt , groupvars , groupbins )
timetable: G = groupcounts (&hellip;, Name , Value )

Count the rows of a timetable in each group.

G = groupcounts ( tt , groupvars ) groups the
rows of tt by the variables named in groupvars and returns
a table with one row per group, carrying the grouping variables,
a GroupCount variable and a Percent variable. The
result is a table and not a timetable: its rows describe groups rather
than instants, so there is nothing left for row times to label.

groupvars names one or more variables, or the row dimension name,
which groups by the row times themselves.

G = groupcounts ( tt , groupvars ,
groupbins ) bins the grouping variables before grouping,
groupbins being a bin count, a vector of edges, or a time unit
for a datetime or duration variable.

A duration is binned by the units that have a fixed length of their
own, 'second' , 'minute' , 'hour' ,
'day' and 'year' ; a week, a month and a quarter have
none and are refused. A narrow bin over a wide span asks for more
bins than a categorical can name, and the call is refused
rather than answered; MATLAB stops at 65536 bins there and returns a
grid that does not reach the end of the span.

The following Name / Value pairs are accepted:

'IncludeMissingGroups'
A logical scalar. When true (the default) rows whose grouping
value is missing form a group of their own, sorted last.
'IncludeEmptyGroups'
A logical scalar. When true the unused categories of a
categorical or binned grouping variable are reported as groups with a
count of zero. It defaults to false .
'IncludedEdge'
Which edge of a bin is included, 'left' (the default) or
'right' . It applies only where groupbins was given.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Count the rows of a timetable in each group.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
timetable.groupfilter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1868
timetable: G = groupfilter ( tt , groupvars , method )
timetable: G = groupfilter ( tt , groupvars , method , datavars )
timetable: G = groupfilter ( tt , groupvars , groupbins , method , &hellip;)
timetable: G = groupfilter (&hellip;, 'IncludedEdge' , edge )

Keep the rows of a timetable whose group passes a test.

G = groupfilter ( tt , groupvars , method )
groups the rows of tt by the variables named in groupvars ,
applies the function handle method to each data variable of each
group, and returns the rows of the groups it accepted. method
receives the values of one variable across the rows of one group and
answers with a logical scalar, keeping or dropping the whole group, or
with one logical per row of the group, keeping those rows. The rows
that survive keep their order and their row times.

groupvars names one or more variables, or the row dimension name,
which groups by the row times themselves.

G = groupfilter ( tt , groupvars , method ,
datavars ) applies method only to the variables named in
datavars . By default every variable that is not a grouping
variable is used, and a row is kept only where every one of them
accepts it.

G = groupfilter ( tt , groupvars ,
groupbins , method , &hellip;) bins the grouping variables
before grouping, groupbins being a bin count, a vector of edges,
or a time unit for a datetime or duration variable. The
'IncludedEdge' option then says which edge of a bin is
included, 'left' (the default) or 'right' .

A duration is binned by the units that have a fixed length of their
own, 'second' , 'minute' , 'hour' ,
'day' and 'year' ; a week, a month and a quarter have
none and are refused. A narrow bin over a wide span asks for more
bins than a categorical can name, and the call is refused
rather than answered; MATLAB stops at 65536 bins there and returns a
grid that does not reach the end of the span.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Keep the rows of a timetable whose group passes a test.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
timetable.groupsummary


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2219
timetable: G = groupsummary ( tt , groupvars )
timetable: G = groupsummary ( tt , groupvars , method )
timetable: G = groupsummary ( tt , groupvars , method , datavars )
timetable: G = groupsummary ( tt , groupvars , groupbins , &hellip;)
timetable: G = groupsummary (&hellip;, Name , Value )

Summarise the variables of a timetable group by group.

G = groupsummary ( tt , groupvars ) groups the
rows of tt by the variables named in groupvars and returns
a table with one row per group, carrying the grouping variables
and a GroupCount variable. The result is a table and not a
timetable: its rows describe groups rather than instants, so there is
nothing left for row times to label.

groupvars names one or more variables, or the row dimension name,
which groups by the row times themselves.

G = groupsummary ( tt , groupvars , method )
also applies method to each data variable of each group, adding
one variable per method and data variable named for both, as in
mean_Speed . method is one of 'mean' ,
'sum' , 'min' , 'max' , 'range' ,
'median' , 'mode' , 'var' , 'std' ,
'nummissing' , 'nnz' and 'numunique' , or
'all' for every one of them in that order, or a function handle,
or a cell array of any of these. A name may be abbreviated to any
unambiguous prefix. 'std' and 'var' are not defined on
an integer variable and refuse one.

G = groupsummary ( tt , groupvars , method ,
datavars ) summarises only the variables named in datavars .
By default every variable that is not a grouping variable is used.

G = groupsummary ( tt , groupvars ,
groupbins , &hellip;) bins the grouping variables before grouping,
groupbins being a bin count, a vector of edges, or a time unit for
a datetime or duration variable.

The following Name / Value pairs are accepted:

'IncludeMissingGroups'
A logical scalar. When true (the default) rows whose grouping
value is missing form a group of their own, sorted last.
'IncludeEmptyGroups'
A logical scalar. When true the unused categories of a
categorical or binned grouping variable are reported as groups with a
count of zero. It defaults to false .
'IncludedEdge'
Which edge of a bin is included, 'left' (the default) or
'right' . It applies only where groupbins was given.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Summarise the variables of a timetable group by group.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
timetable.grouptransform


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2074
timetable: G = grouptransform ( tt , groupvars , method )
timetable: G = grouptransform ( tt , groupvars , method , datavars )
timetable: G = grouptransform ( tt , groupvars , groupbins , method , &hellip;)
timetable: G = grouptransform (&hellip;, Name , Value )

Transform the variables of a timetable group by group.

G = grouptransform ( tt , groupvars ,
method ) groups the rows of tt by the variables named in
groupvars and applies method to each data variable within
each group. The result has the same rows as tt , in the same
order and carrying the same row times, so a transform never moves a row
in time.

groupvars names one or more variables, or the row dimension name,
which groups by the row times themselves. method is one of
'zscore' , 'norm' , 'meancenter' ,
'rescale' , 'meanfill' and 'linearfill' , or a
function handle applied to each group.

G = grouptransform ( tt , groupvars ,
method , datavars ) transforms only the variables named in
datavars . By default every variable that is not a grouping
variable is transformed.

G = grouptransform ( tt , groupvars ,
groupbins , method , &hellip;) bins the grouping variables
before grouping, groupbins being a bin count, a vector of edges,
or a time unit for a datetime or duration variable.

A duration is binned by the units that have a fixed length of their
own, 'second' , 'minute' , 'hour' ,
'day' and 'year' ; a week, a month and a quarter have
none and are refused. A narrow bin over a wide span asks for more
bins than a categorical can name, and the call is refused
rather than answered; MATLAB stops at 65536 bins there and returns a
grid that does not reach the end of the span.

The following Name / Value pairs are accepted:

'ReplaceValues'
A logical scalar. When true (the default) each transformed
variable replaces the one it came from; when false the results
are appended as new variables named for the method and the variable
they came from, as in zscore_Speed .
'IncludedEdge'
Which edge of a bin is included, 'left' (the default) or
'right' . It applies only where groupbins was given.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Transform the variables of a timetable group by group.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
timetable.head


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 980
timetable: head ( tt )
timetable: head ( tt , k )
timetable: out = head ( tt , k )

Display or return the first k rows of a timetable.

head ( tt ) displays the first eight rows of tt , or
all of them if it has fewer. head ( tt , k ) displays
the first k instead. k must be a real, nonnegative,
integer scalar value; a k of zero displays no rows at all rather
than raising.

out = head ( tt , k ) returns those rows in a
new timetable instead of displaying them. If k is omitted or
empty it defaults to eight.

The rows come back in the order the timetable holds them. head
takes the first rows and not the earliest ones, so on a timetable
whose times are out of order it returns whatever happens to be stored
first. Sort it beforehand to ask the other question.

The time step is read afresh from the row times that are kept, so the
head of an hourly timetable is hourly and the head of a timetable
whose spacing changes partway may not be.

See also:
tail ,
sortrows ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Display or return the first k rows of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
timetable.height


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 357
timetable: H = height ( tt )

Number of rows in timetable.

H = height ( tt ) returns the number of rows in the
timetable tt as a scalar. It is the equivalent of
size ( tt , 1) .

The count comes from the row times rather than from the variables, so
a timetable whose variables have all been removed still reports the
rows it labels.

See also:
width ,
size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Number of rows in timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
timetable.horzcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 965
timetable: tt = horzcat ( tt1 , tt2 , &hellip;)

Concatenate timetables horizontally.

tt = horzcat ( tt1 , tt2 , &hellip;) appends the
variables of its inputs, which must all have distinct variable names
and, where they are timetables, identical row times. It is the
operation [ tt1 , tt2 ] performs.

A table may be appended to a timetable, but only after it, and
it must have as many rows as the timetable has. The row times and the
time step are those of the timetable, and the row dimension is named
after the first input that does not use the default name.

Where an operand is an eventtable , or carries one on its
Events property, the result is an event table too and the
operands&rsquo; event tables are merged: an outer join keyed on the event
times and every variable the two share, ordered by those keys. The
three properties saying which variables describe the events must
agree, and the operation is refused where they do not.

See also:
vertcat ,
cat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Concatenate timetables horizontally.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
timetable.inner2outer


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 544
timetable: tt2 = inner2outer ( tt )

Turn the nesting of a timetable inside out.

tt2 = inner2outer ( tt ) returns a timetable whose
variables are named for the variables of the tables nested inside
tt , each holding a nested table named for the variables of
tt that held them. The rows and their row times are untouched:
only the nesting is turned inside out.

An inner variable name held by one nested table alone becomes a plain
variable rather than a nested one. A timetable holding nothing nested
is returned as it is.

See also:
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Turn the nesting of a timetable inside out.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
timetable.innerjoin


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1562
timetable: ttC = innerjoin ( ttL , tblR )
timetable: ttC = innerjoin ( ttL , tblR , Name , Value )
timetable: [ ttC , iL , iR ] = innerjoin (&hellip;)

Join a timetable with another tabular object, keeping matched rows.

ttC = innerjoin ( ttL , tblR ) returns a
timetable holding one row for every pair of rows of ttL and
tblR whose keys match, in key order. Each row carries the row
time of the row of ttL it came from, so a key matched more than
once repeats its row time and the result is generally irregular.

With no key named, two timetables join on their row times; a timetable
and a table have no key in common unless one is named, since the row
times are not a variable.

[ ttC , iL , iR ] = innerjoin (&hellip;) also
returns the rows of ttL and of tblR each row came from.

The following Name / Value pairs are accepted:

'Keys'
The variables to match on, named on both sides. The row dimension name
names the row times.
'LeftKeys' , 'RightKeys'
The variables to match on, named separately for each side and given
together.
'LeftVariables' , 'RightVariables'
The variables each side contributes. By default the left contributes
all of its own and the right all but its keys.

Where an operand is an eventtable , or carries one on its
Events property, the result is an event table too and the
operands&rsquo; event tables are merged: an outer join keyed on the event
times and every variable the two share, ordered by those keys. The
three properties saying which variables describe the events must
agree, and the operation is refused where they do not.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
Join a timetable with another tabular object, keeping matched rows.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
timetable.isempty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 185
timetable: TF = isempty ( tt )

True for an empty timetable.

TF = isempty ( tt ) returns true when tt has no
rows or no variables, and false otherwise.

See also:
size ,
height ,
width


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
True for an empty timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
timetable.isequal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1584
timetable: TF = isequal ( A , B )
timetable: TF = isequal ( A , B , &hellip;)

Test timetables for equality.

TF = isequal ( A , B ) returns a logical scalar
TF , which is true when the timetables A and B
are the same size, carry the same row times, variable names and
metadata, and each pair of corresponding variables holds equal values,
and false otherwise.

The row times take part in the comparison and the properties that
merely describe them do not, so TimeStep , SampleRate
and StartTime are excluded. A timetable told its time step at
construction therefore equals one that read the same step off the row
times it was given, although the two report a different
TimeStep once subset to a single row.

Variables are compared by value and not by class, exactly as
isequal compares arrays elsewhere, so a timetable holding
int8 ([1; 2]) equals one holding [1; 2] . The
VariableTypes property, which only restates those classes,
takes no part in the comparison. Every other property does: two
timetables differing only in Description , UserData ,
VariableUnits , VariableDescriptions ,
VariableContinuity or a custom property are not equal.

As with NaN , missing values are never equal, so a missing row
time or element anywhere in either timetable makes the result
false ; use isequaln to treat missing values as equal.

Further timetables may be supplied, as in isequal ( A ,
B , C , &hellip;) , in which case TF is true
only when all of them are equal to one another. Any argument that is
not a timetable, a table included, makes the result false
rather than raising an error.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Test timetables for equality.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
timetable.isequaln


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 683
timetable: TF = isequaln ( A , B )
timetable: TF = isequaln ( A , B , &hellip;)

Test timetables for equality, treating missing values as equal.

TF = isequaln ( A , B ) is identical to
isequal ( A , B ) except that missing values are
treated as equal to one another, in the same way that isequaln
treats NaN . Two timetables whose row times are NaT in
the same places are therefore equal, where isequal calls them
unequal.

Further timetables may be supplied, as in isequaln ( A ,
B , C , &hellip;) , in which case TF is true
only when all of them are equal to one another. Any argument that is
not a timetable, a table included, makes the result false
rather than raising an error.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
Test timetables for equality, treating missing values as equal.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
timetable.ismissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 839
timetable: TF = ismissing ( tt )
timetable: TF = ismissing ( tt , indicator )

Find missing values in the variables of a timetable.

TF = ismissing ( tt ) returns a logical array with one
row per row of tt and one column per variable, true where the
variable is missing there. What counts as missing depends on the type:
NaN for numeric data, NaT for datetime ,
<undefined> for categorical , and an empty character
vector or string.

The row times are not read. They label the rows rather than being one
of them, so a missing row time is not reported here and does not make
anymissing true. rmmissing does drop such a row, being
about what can be kept rather than about what is missing.

TF = ismissing ( tt , indicator ) treats the
values in indicator as missing as well.

See also:
anymissing ,
rmmissing ,
standardizeMissing ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Find missing values in the variables of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
timetable.isregular


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1988
timetable: TF = isregular ( tt )
timetable: TF = isregular ( tt , unit )

True when the row times of a timetable are evenly spaced.

TF = isregular ( tt ) returns true when tt is
regular with respect to absolute time, that is when consecutive row
times are separated by the same fixed length of time. A calendar
month has no fixed length, so a monthly timetable answers false here
and true for 'months' below.

TF = isregular ( tt , unit ) returns true when
the row times are evenly spaced by a whole number of unit , one
of 'time' , 'days' , 'weeks' ,
'months' , 'quarters' or 'years' .
'time' means absolute time and is what the one-argument form
asks. There is no unit smaller than a day: an hourly timetable is
regular in time and in nothing else.

The calendar units are measured on the calendar rather than in
elapsed time, which is what separates them. Across a daylight saving
change a run of calendar days is regular in 'days' and regular
in nothing else, one of those days being an hour shorter than the
rest, and such a timetable reports no time step at all while still
answering true here.

A timetable with fewer than two rows has no spacing to measure and
answers from the time step it remembers, so a single row taken out of
a timetable told it was hourly is still regular in time, while one
taken out of a timetable that read its step off its row times is
not.

The answer is always computed from the row times and
unit is always checked , which MATLAB does neither of when the
step was declared with 'TimeStep' or 'SampleRate' and
is a duration : there it answers from the stored step alone. Two
consequences follow there and not here. A misspelt unit, and the
non-units 'seconds' , 'minutes' and 'hours' ,
come back false rather than raising. And two timetables with
identical row times disagree: times built as
d0 + hours (0:24:96) answer true for 'days' while the
same times declared as 'TimeStep' , hours (24) answer
false. Both answer true here.

See also:
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
True when the row times of a timetable are evenly spaced.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
timetable.issorted


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 753
timetable: TF = issorted ( tt )

True when the row times of a timetable are in ascending order.

TF = issorted ( tt ) returns true when each row time
is at or after the one before it. The ordering is not strict, so
repeated times are sorted; a timetable with any missing row time is
not, and one with fewer than two rows has nothing out of order and so
is. Only the row times are read: the variables take no part.

This is the whole of the question issorted answers here. It
takes no dimension, no direction and no options; use
issortedrows to ask about a direction, about a variable, or
about where missing values should fall.

A table has no issorted , its row names being labels
rather than an ordering.

See also:
issortedrows ,
sortrows ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
True when the row times of a timetable are in ascending order.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
timetable.issortedrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 910
timetable: TF = issortedrows ( tt )
timetable: TF = issortedrows ( tt , rowDimName )
timetable: TF = issortedrows ( tt , vars )
timetable: TF = issortedrows ( tt , &hellip;, direction )
timetable: TF = issortedrows (&hellip;, Name , Value )

True when the rows of a timetable are already in a given order.

TF = issortedrows ( tt ) returns true when the rows
are in ascending order of their row times, which is the order
sortrows would put them in with nothing else asked.

Every form sortrows accepts is accepted here and asks the same
question of it: the row dimension name, one or more variables named,
indexed or selected, a direction, and the 'MissingPlacement'
and 'ComparisonMethod' pairs. A direction must follow the
keys it applies to, as it must there.

The sort is stable, so the answer is exactly whether sorting would
leave every row where it already is.

See also:
issorted ,
sortrows ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
True when the rows of a timetable are already in a given order.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
timetable.istimetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 201
timetable: TF = istimetable ( tt )

True if input is a timetable , false otherwise.

TF = istimetable ( tt ) always returns true for a
timetable, irrespective of its size.

See also:
istable,
istabular


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
True if input is a timetable, false otherwise.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
timetable.join


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1831
timetable: ttC = join ( ttL , tblR )
timetable: ttC = join ( ttL , tblR , Name , Value )
timetable: [ ttC , index ] = join (&hellip;)

Join a timetable with another tabular object.

ttC = join ( ttL , tblR ) returns a timetable
with every row of ttL , its row times kept, and beside it the row
of tblR whose key matches. The right operand contributes
variables only, so the result is a timetable exactly as long as
ttL .

The key must name a row of tblR for every row of ttL , and
the keys of tblR must be unique. With no key named, two
timetables join on their row times; a timetable and a table have no
key in common unless one is named, since the row times are not a
variable.

[ ttC , index ] = join (&hellip;) also returns
index , naming the row of tblR each row took.

The following Name / Value pairs are accepted:

'Keys'
The variables to match on, named on both sides. The row dimension name
names the row times.
'LeftKeys' , 'RightKeys'
The variables to match on, named separately for each side and given
together. They must name the same number of keys.
'LeftVariables' , 'RightVariables'
The variables each side contributes. By default the left contributes
all of its own and the right all but its keys.
'KeepOneCopy'
Variables that both sides carry and only the left contributes.

A variable name carried by both sides and contributed by both is
suffixed with the caller&rsquo;s own name for each operand, falling back to
_left and _right .

Where an operand is an eventtable , or carries one on its
Events property, the result is an event table too and the
operands&rsquo; event tables are merged: an outer join keyed on the event
times and every variable the two share, ordered by those keys. The
three properties saying which variables describe the events must
agree, and the operation is refused where they do not.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Join a timetable with another tabular object.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
timetable.lag


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1094
timetable: ttB = lag ( ttA )
timetable: ttB = lag ( ttA , n )

Shift the data of a timetable along its own row times.

ttB = lag ( ttA ) moves every value one row later,
leaving the first row missing and dropping what fell off the end.
The row times themselves do not move, so the values arrive against
later times than the ones they were recorded at.

n says how far, as a whole number of rows, as a
duration that must be a multiple of the time step, or as a
calendarDuration whose unit the timetable must be regular in.
A negative n moves the values earlier instead, and a lag past
the height of the timetable leaves every row missing.

The timetable must be regular : a shift by rows only means
anything when the rows are evenly spaced, and a timetable of one row
or of none is not regular.

A row left with no value takes the missing value of its variable&rsquo;s
own type, which for a logical variable is false and for
a character one a space, neither type having a missing value of its
own. Every property of the timetable survives.

See also:
retime ,
synchronize ,
isregular ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Shift the data of a timetable along its own row times.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
timetable.length


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 301
timetable: length ( tt )

Length is not defined for a timetable.

length ( tt ) always raises. A timetable has two
dimensions that mean different things, and the larger of them is not
a useful answer about either; ask height , width or
size for the one that is wanted.

See also:
height ,
width ,
size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Length is not defined for a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
timetable.mergevars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1277
timetable: ttB = mergevars ( ttA , vars )
timetable: ttB = mergevars (&hellip;, 'NewVariableName' , name )
timetable: ttB = mergevars (&hellip;, 'MergeAsTable' , tf )

Combine several variables of a timetable into one.

ttB = mergevars ( ttA , vars ) replaces the
variables in vars with a single multi-column one, put where the
first of them was. It is named Var N unless
'NewVariableName' says otherwise, and the merged variables are
no longer reachable by their old names.

Nothing the merged variables carried about themselves survives: one
variable carries one unit, one description, one continuity and one
entry of a custom property describing the variables, and there is no
saying which of them the merged variable should take, so it takes
none: where the continuity is set at all, the merged variable&rsquo;s
reads 'unset' , and a property that was never set stays
unset. The remaining variables keep theirs.

The row times are not a variable and cannot be merged.

Merging a variable of an eventtable that one of its three event
properties names clears that designation, the merged variable being a
different variable under a different name. MATLAB refuses the call
instead, on the ground that the merged variable is no longer a column.

See also:
splitvars ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Combine several variables of a timetable into one.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
timetable.movevars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 557
timetable: ttB = movevars ( ttA , vars , 'Before' , location )
timetable: ttB = movevars ( ttA , vars , 'After' , location )

Move variables within a timetable.

ttB = movevars ( ttA , vars , &hellip;) puts the
variables named in vars before or after location , which
names or numbers another variable. Each variable takes its units,
description and continuity with it.

The row times are not a variable: they can be neither moved nor used
as the location, and they stay where they are whatever else is
reordered.

See also:
addvars ,
removevars ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Move variables within a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
timetable.ndims


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 246
timetable: N = ndims ( tt )

Number of dimensions in timetable.

N = ndims ( tt ) always returns 2. A timetable is
always a two-dimensional container of rows and variables, whatever the
shape of the values held in those variables.

See also:
size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Number of dimensions in timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
timetable.numel


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 177
timetable: N = numel ( tt )

Number of elements in timetable.

N = numel ( tt ) returns the number of rows times the
number of variables in tt .

See also:
size ,
height ,
width


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Number of elements in timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
timetable.outerjoin


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1784
timetable: ttC = outerjoin ( ttL , tblR )
timetable: ttC = outerjoin ( ttL , tblR , Name , Value )
timetable: [ ttC , iL , iR ] = outerjoin (&hellip;)

Join a timetable with another tabular object, keeping unmatched rows.

ttC = outerjoin ( ttL , tblR ) returns a
timetable holding one row for every pair of rows of ttL and
tblR whose keys match, and one for every row of either that
matched nothing, its variables from the other side filled with missing
values. A row that came from a row of ttL carries its row time;
a row that matched nothing on the left has none of its own.

With no key named, two timetables join on their row times; a timetable
and a table have no key in common unless one is named.

[ ttC , iL , iR ] = outerjoin (&hellip;) also
returns the rows of ttL and of tblR each row came from,
0 where it came from neither.

The following Name / Value pairs are accepted:

'Keys' , 'LeftKeys' , 'RightKeys'
The variables to match on. The row dimension name names the row times.
'LeftVariables' , 'RightVariables'
The variables each side contributes. By default each contributes all
of its own, keys included.
'Type'
'full' (the default) keeps the unmatched rows of both sides,
'left' and 'right' only those of the side named.
'MergeKeys'
A logical scalar. When true each pair of keys becomes a single
variable in the left one&rsquo;s position, taking its value from whichever
side had a row.

Where an operand is an eventtable , or carries one on its
Events property, the result is an event table too and the
operands&rsquo; event tables are merged: an outer join keyed on the event
times and every variable the two share, ordered by those keys. The
three properties saying which variables describe the events must
agree, and the operation is refused where they do not.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
Join a timetable with another tabular object, keeping unmatched rows.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
timetable.overlapsrange


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1081
timetable: TF = overlapsrange ( tt , ref )
timetable: [ TF , whichRows ] = overlapsrange ( tt , ref )

True when a timetable and a range of times have any instant in common.

TF = overlapsrange ( tt , ref ) returns true when
the range of tt , from its earliest to its latest row time, shares
at least one instant with ref . Meeting at a single instant is
enough: a range that starts exactly at the last row time overlaps.

Whether the ends themselves count is ref &rsquo;s to say. A
timerange that excludes its lower bound does not overlap a
timetable that reaches only as far as that bound.

ref takes the same three forms as in containsrange : a
timerange , a timetable whose earliest and latest row
times give the range, or a datetime or duration scalar
naming one instant.

[ TF , whichRows ] = overlapsrange (&hellip;) also
returns a column of logicals saying which rows of tt fall in
ref . A timetable can overlap a range without any of its rows
falling in it, the overlap being of the ranges and not of the rows.

See also:
containsrange ,
withinrange ,
timerange,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
True when a timetable and a range of times have any instant in common.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
timetable.pivot


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1671
timetable: P = pivot ( tt , Name , Value , &hellip;)

Summarise a timetable across two grouping dimensions.

P = pivot ( tt , 'Rows' , rowvars ,
'Columns' , colvars ) groups the rows of tt by
rowvars down the page and by colvars across it, and returns
a table holding one row per row group and one variable per
column group. At least one of the two must be given.

Either may name the row dimension, which groups by the row times: as
'Rows' they become a variable of the result, and as
'Columns' they name its variables. The result is a table and
not a timetable, its rows and columns being groups rather than
instants.

With no 'DataVariable' the cells count the rows of each group;
with one they summarise its values, by 'Method' , which defaults
to summing them.

The following Name / Value pairs are accepted:

'Rows' , 'Columns'
The variables grouping down the page and across it, or the row
dimension name.
'DataVariable'
The variable summarised in each cell.
'Method'
The summary applied to each cell, a method name or a function handle.
'RowsBinMethod' , 'ColumnsBinMethod'
Binning applied to the grouping variables before grouping, with
'IncludedEdge' saying which edge of a bin is included.
'IncludeMissingGroups' , 'IncludeEmptyGroups'
Whether a group of missing values, and whether an unused category, are
reported.
'IncludeTotals'
Whether a marginal row and column are added, labelled
Overall_<method> .
'RowLabelPlacement'
Whether the row groups become a variable of the result or its row
names.
'OutputFormat'
'flat' (the default) or 'nested' , which groups the data
variables into nested tables by the column hierarchy.

See also:
groupsummary ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Summarise a timetable across two grouping dimensions.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
timetable.removevars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 696
timetable: ttB = removevars ( ttA , vars )

Remove variables from a timetable.

ttB = removevars ( ttA , vars ) deletes the
variables named, numbered, selected by a logical vector or picked out
by a vartype .

The row times are not a variable and cannot be removed: a timetable
keeps them whatever else goes. Removing every variable leaves a
timetable with none, still carrying its row times and its time step,
rather than an empty one.

Removing a variable of an eventtable that one of its three
event properties names clears that designation, the name having
nothing left to resolve to. Deleting the variable by assigning an
empty matrix does the same.

See also:
addvars ,
movevars ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Remove variables from a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
timetable.renamevars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 720
timetable: ttB = renamevars ( ttA , vars , newNames )

Rename variables in a timetable.

ttB = renamevars ( ttA , vars , newNames )
gives each variable in vars the matching name in
newNames . Everything else about the variable is kept, its units
and its description included.

Dimension names are not renamed here: assign to
tt .Properties.DimensionNames for that. A variable
cannot be given the row dimension&rsquo;s name either, the two sharing one
namespace.

Renaming a variable of an eventtable that one of its three
event properties names carries that designation to the new name.
MATLAB clears it instead and does not restore it when the variable is
renamed back; see deviation D6.

See also:
movevars ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Rename variables in a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
timetable.repelem


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 535
timetable: tt2 = repelem ( tt , rows , cols )

Repeat each row and variable of a timetable in place.

tt2 = repelem ( tt , rows , cols ) repeats
each row of tt rows times and each variable cols
times, keeping the repeats of a row together. Both counts must be
given, a timetable having exactly two dimensions. Each repeated row
carries the row time of the row it came from, so the result has
repeated row times and is generally irregular; each repeated variable
takes a numbered name, A becoming A , A_1 .

See also:
repmat ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Repeat each row and variable of a timetable in place.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
timetable.repmat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 473
timetable: tt2 = repmat ( tt , sz )
timetable: tt2 = repmat ( tt , rows , cols )

Repeat a timetable as a block.

tt2 = repmat ( tt , rows , cols ) repeats
the whole timetable rows times downwards and cols times
across. Given a single argument both counts take it. Each copy carries
the row times it came from, so the result has repeated row times and is
generally irregular; each repeated variable takes a numbered name,
A becoming A , A_1 .

See also:
repelem ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Repeat a timetable as a block.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
timetable.retime


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4580
timetable: ttB = retime ( ttA , newTimes )
timetable: ttB = retime ( ttA , newTimeStep )
timetable: ttB = retime (&hellip;, method )
timetable: ttB = retime (&hellip;, Name , Value )

Resample a timetable onto new row times.

ttB = retime ( ttA , newTimes ) returns a
timetable whose rows sit at newTimes , a datetime or
duration vector of the same kind as the row times of
ttA , sorted and without repeats.

ttB = retime ( ttA , newTimeStep ) builds those
times instead from a time unit, one of 'secondly' ,
'minutely' , 'hourly' , 'daily' ,
'weekly' , 'monthly' , 'quarterly' and
'yearly' . The grid starts at the unit&rsquo;s own boundary at or
before the first row time. A filling method reads the times as sample
points and runs the grid to the first boundary at or after the last row
time, so three hours of data retimed 'daily' spans two days; an
aggregating method reads them as bins and stops at the bin holding the
last row time, so the same three hours give one day. Weeks begin on
Sunday. A duration row time carries no calendar, so a unit
measures it only where a duration counts in that unit:
'secondly' , 'minutely' , 'hourly' ,
'daily' and 'yearly' are taken and 'weekly' ,
'monthly' and 'quarterly' are refused.

ttB = retime ( ttA , 'regular' , &hellip;)
builds a grid from the first row time in steps of the
'TimeStep' or 'SampleRate' given after it, exactly one
of which is required. 'SampleRate' is in hertz. It is bounded
by the same rule.

method says how a row that the old times do not carry takes its
value. 'fillwithmissing' leaves it missing;
'previous' , 'next' and 'nearest' copy a
neighbouring value; and 'linear' , 'spline' ,
'pchip' and 'makima' interpolate, which restricts the
timetable to numeric, datetime and duration variables.
'default' , which is also what no method at all means, reads
VariableContinuity and treats a 'continuous' variable
as 'linear' , a 'step' one as 'previous' , and
an 'unset' or 'event' one as
'fillwithmissing' .

method may instead aggregate the rows the target times gather
into each bin, as 'sum' , 'prod' , 'mean' ,
'median' , 'mode' , 'min' , 'max' ,
'count' , 'firstvalue' or 'lastvalue' , or as a
function handle taking the rows of one bin and returning a single row.
A bin holding no row answers 0 for 'sum' , 1 for
'prod' , 0 for 'count' and missing for the rest, and a
function handle is called on it too, with an empty slice of the
variable&rsquo;s own type. Every method but 'count' ,
'firstvalue' and 'lastvalue' needs a numeric,
logical , datetime or duration variable.

'IncludedEdge' says which edge of a bin belongs to it,
'left' by default, under which the last bin runs on past the
last target time; 'right' instead lets the first bin run back
before the first. A grid built from a unit or a step moves with it:
closed on the right it starts at the first bin that can hold a row and
ends one unit past the last row time. It is read only by an
aggregating method.

An option the chosen method cannot use is warned about and
ignored rather than dropped in silence, once per call. MATLAB says
nothing in that case.

An aggregation reads the row times as bins rather than as sample
points, so it accepts row times that repeat and row times out of
order, both of which the other methods refuse.

'fillwithconstant' gives every added row the value of
'Constant' , which is required with it and must be a value of
the variable&rsquo;s own kind: a number for a numeric or logical
variable, a duration for a duration one, and text for a
string or a categorical one, where a name the variable
does not yet carry is added to its categories. A number standing for
a duration or for text is refused rather than read as days or
as digits. Needing no missing value of its own, it serves a variable
that has none.

'EndValues' says what a target time outside the span of the
old ones takes, either 'extrap' or a constant. It is
'extrap' by default, under which 'linear' and the
interpolating methods extrapolate and the neighbouring methods carry
the nearest known value outward.

A value that was missing before the call is a gap like any
other and is filled with them: a row the new times keep is resampled
along with the rest, so 'previous' gives it the last value
that was not missing rather than the missing value it held. Only
'fillwithmissing' leaves such a value alone.

Every property of the timetable survives, VariableUnits ,
VariableDescriptions and VariableContinuity included,
and the result carries the time step its new row times imply.

See also:
timetable,
isregular ,
fillmissing ,
synchronize


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Resample a timetable onto new row times.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
timetable.rmmissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1008
timetable: ttB = rmmissing ( ttA )
timetable: ttB = rmmissing ( ttA , Name , Value )
timetable: [ ttB , TF ] = rmmissing (&hellip;)

Remove the incomplete rows of a timetable.

ttB = rmmissing ( ttA ) removes every row holding a
missing value.

A row whose row time is missing is removed whatever its
variables hold , and whatever 'DataVariables' or
'MinNumMissing' say: a row that cannot be placed in time is
not a row a timetable can keep. That is a precondition rather than a
report of missingness, which is why ismissing does not mark
such a row and anymissing does not count it.

'DataVariables' names the variables to judge a row by, and
'MinNumMissing' how many missing values a row must hold before
it goes. Neither reaches the row times.

[ ttB , TF ] = rmmissing (&hellip;) also returns a
logical column marking the rows that were removed, the ones dropped
for their row times included.

The time step is read afresh from the rows that survive.

See also:
ismissing ,
standardizeMissing ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Remove the incomplete rows of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
timetable.rmprop


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 392
timetable: tt = rmprop ( tt , propertyNames )

Remove custom properties from a timetable.

tt = rmprop ( tt , propertyNames ) removes the
named properties carrying custom metadata from the timetable
tt . propertyNames is a character vector, a cell array of
character vectors, or a string array. A name matching no custom
property is ignored rather than refused.

See also:
addprop ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Remove custom properties from a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
timetable.rowfun


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2477
timetable: B = rowfun ( func , A )
timetable: B = rowfun ( func , A , Name , Value , &hellip;)

Apply a function to each row of a timetable.

B = rowfun ( func , A ) applies the function
handle func to each row of the timetable A and returns the
results in the timetable B , which has one row for each row of
A and carries its row times. By default the value of each
variable in the row is passed to func as a separate input
argument, and the output variables of B are named Var1 ,
Var2 , and so on.

B = rowfun ( func , A , Name , Value ,
&hellip;) modifies the operation through the following
Name / Value pairs:

'InputVariables'
The variables of A that are passed to func , given as
variable names, indices, a logical vector, or a function handle. By
default every variable of A that is not a grouping variable is
used.
'GroupingVariables'
One or more variables of A that define groups of rows, or the row
dimension name, which groups by the row times themselves. func
is then applied once to each group, receiving the values of each input
variable across the rows of the group, and B has one row per
group, carrying the row time of the first row of the group. Grouping
variables appear in B alongside a GroupCount variable;
the row times do not, being the row times of the result. Rows with a
missing value in any grouping variable are omitted.
'OutputVariableNames'
The names of the output variables of B , one per output of
func .
'NumOutputs'
The number of output arguments to request from func . It defaults
to the number of 'OutputVariableNames' if those are given,
otherwise to 1 .
'SeparateInputs'
A logical scalar. When true (the default), the value of each
input variable is passed to func as a separate argument. When
false , the values of the row are horizontally concatenated and
passed as a single argument.
'ExtractCellContents'
A logical scalar. When true , the contents of cell-valued
variables are extracted before being passed to func . It defaults
to false .
'OutputFormat'
One of 'table' (the default, and also selected by
'auto' ), which returns the results in a timetable;
'uniform' , which requires func to return a scalar and
returns them in an array; or 'cell' , which returns them in a
cell array.
'ErrorHandler'
A function handle called whenever func raises an error, receiving
a structure with fields identifier , message and
index , followed by the arguments func was called with.
Its outputs are used in place of the ones func did not return.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Apply a function to each row of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
timetable.rows2vars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1228
timetable: tbl = rows2vars ( tt )
timetable: tbl = rows2vars ( tt , Name , Value )

Turn the rows of a timetable into variables.

tbl = rows2vars ( tt ) returns a table whose
rows are the variables of tt and whose variables are its rows.
The first variable, OriginalVariableNames , names the variables
of tt ; the rest are named for the row times they came from,
rendered as the timetable displays them and made into valid names, and
the second dimension of the result takes the name of the row dimension.

The result is a table and not a timetable: its rows are variables and
there is no longer a time to label them by.

Where the variables are not all of one type the result holds cell
arrays, every value being wrapped so that one variable can carry them
all.

The following Name / Value pairs are accepted:

'DataVariables'
The variables of tt that become rows. By default all of them do.
'VariableNamesSource'
A variable of tt whose values name the new variables instead of
the row times. A repeated name is numbered rather than refused, and
the second dimension of the result takes the name of that variable.
'VariableNamingRule'
'modify' (the default) makes each new name a valid identifier;
'preserve' keeps it as it is.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Turn the rows of a timetable into variables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
timetable.size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 433
timetable: sz = size ( tt )
timetable: dim_sz = size ( tt , dim )
timetable: [ rows , columns ] = size ( tt )

Size of a timetable.

sz = size ( tt ) returns a two-element row vector
with the number of rows and the number of variables in tt .

dim_sz = size ( tt , dim ) returns the size
along the dimension dim . A timetable has two dimensions, so any
dimension above the second has size 1.

See also:
height ,
width ,
ndims ,
numel


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
Size of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
timetable.sortrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2217
timetable: ttB = sortrows ( ttA )
timetable: ttB = sortrows ( ttA , rowDimName )
timetable: ttB = sortrows ( ttA , vars )
timetable: ttB = sortrows ( ttA , &hellip;, direction )
timetable: ttB = sortrows (&hellip;, Name , Value )
timetable: [ ttB , index ] = sortrows (&hellip;)

Sort the rows of a timetable.

ttB = sortrows ( ttA ) orders the rows by their row
times, earliest first. Rows sharing a time keep the order they were
in: the row times alone decide, and the variables are never consulted
to break a tie.

ttB = sortrows ( ttA , rowDimName ) does the
same, naming the row times through the first of
ttA .Properties.DimensionNames . That name is the only way
to reach them: a numeric index counts the variables, so
sortrows ( ttA , 1) orders by the first variable and not by
the times, and there is no index that means the row times. Renaming
the row dimension renames the key with it.

ttB = sortrows ( ttA , vars ) orders by one or
more variables, named, indexed by number, selected by a logical vector
or picked out by a vartype . A negative index sorts that
variable in descending order. The row dimension name may appear among
vars , in which case the row times take their turn as a key like
any other.

ttB = sortrows (&hellip;, direction ) sorts as
'ascend' or 'descend' , either one direction for every
key or one per key. A direction must follow the keys it applies to,
so sortrows ( ttA , 'descend') is an error rather than a
reversed sort: with nothing else given, the first argument is read as
the variables to sort by.

The name-value pair 'MissingPlacement' takes
'auto' (the default), 'first' or 'last' and
says where missing keys go. 'auto' puts them last when
sorting up and first when sorting down. 'ComparisonMethod'
takes 'auto' , 'real' or 'abs' and applies to
numeric variables. Both must follow the keys as well.

[ ttB , index ] = sortrows (&hellip;) also returns the
permutation, so that ttA ( index ,:) is ttB .

The time step is read afresh from the sorted row times rather than
carried over, so sorting an out-of-order hourly timetable makes it
regular again, and sorting one that ran backwards turns its step from
minus one hour to plus one.

See also:
issortedrows ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Sort the rows of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
timetable.splitapply


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 693
timetable: Y = splitapply ( func , tt , G )
timetable: [ Y1 , &hellip;] = 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&rsquo;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 , &hellip;] = splitapply (&hellip;) asks func for as
many outputs as are requested and stacks each of them.

See also:
findgroups ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Apply a function to each group of rows of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
timetable.splitvars


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 686
timetable: ttB = splitvars ( ttA )
timetable: ttB = splitvars ( ttA , vars )
timetable: ttB = splitvars (&hellip;, 'NewVariableNames' , newNames )

Split multi-column variables of a timetable into one each.

ttB = splitvars ( ttA ) splits every multi-column
variable, and every nested table, into one variable per column.
ttB = splitvars ( ttA , vars ) splits only those
named.

The new variables are named after the one they came from with a column
number appended, unless 'NewVariableNames' gives them names.
Splitting a variable that was merged does not bring back the units the
merge discarded.

The row times are not a variable and cannot be split.

See also:
mergevars ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Split multi-column variables of a timetable into one each.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
timetable.stack


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1391
timetable: tt2 = stack ( tt , vars )
timetable: tt2 = stack ( tt , vars , Name , Value )
timetable: [ tt2 , index ] = stack (&hellip;)

Stack several variables of a timetable into one.

tt2 = stack ( tt , vars ) replaces the variables
named in vars with a single variable holding their values one
under the other, and an indicator variable naming which of them each
value came from. Every other variable is carried along, repeated once
per stacked variable, and so is the row time of the row it came from:
a timetable of two rows stacking two variables has four rows and two
pairs of equal row times, which generally makes it irregular.

vars names the variables to stack. A cell array of variable
references stacks several groups at once, one new variable per group,
each group holding the same number of variables.

[ tt2 , index ] = stack (&hellip;) also returns
index , naming the row of tt each row of tt2 came
from.

The following Name / Value pairs are accepted:

'ConstantVariables'
The variables carried along unstacked. By default every variable that
is not being stacked is carried.
'NewDataVariableName'
The name of the stacked variable, one per group. By default the names
of the stacked variables are joined with underscores.
'IndexVariableName'
The name of the indicator variable. By default it is the name of the
stacked variable followed by _Indicator .

See also:
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Stack several variables of a timetable into one.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
timetable.standardizeMissing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 558
timetable: ttB = standardizeMissing ( ttA , indicator )
timetable: ttB = standardizeMissing (&hellip;, 'DataVariables' , vars )

Make given values missing in a timetable.

ttB = standardizeMissing ( ttA , indicator )
replaces every value matching indicator with the missing value
of its own type, so that ismissing and rmmissing will
afterwards treat it as missing.

'DataVariables' restricts it to the variables named. The row
times are not a data variable and are never rewritten, so the time
step is unchanged.

See also:
ismissing ,
rmmissing ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Make given values missing in a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
timetable.summary


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1346
timetable: summary ( tt )
timetable: s = summary ( tt )

Summarise a timetable.

summary ( tt ) prints what the timetable holds: its size,
its description where it has one, the row times, the variables with
their types and any units and descriptions, and a table of statistics
for everything that has any.

s = summary ( tt ) returns that as a structure
instead, one field per variable and one for the row times, filed under
the row dimension&rsquo;s name and coming first.

The row times report where they start, how fast they run and how far
apart they step, in StartTime , SampleRate and
TimeStep , alongside the statistics a datetime or
duration variable would report. They carry no description,
units or continuity, having none.

Which statistics a variable reports follows its type. Numeric,
datetime and duration variables report the count of
missing values, the smallest, the median, the largest, the mean and
the standard deviation; an integer reports no deviation and its median
rounds to its own type; an ordinal categorical is ordered but
has no mean; a plain one reports its categories and their counts; a
logical reports how many are true and false and appears in no
statistics; and everything else reports the count of missing values
alone. A variable of several columns reports one row per column.

See also:
ismissing ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Summarise a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
timetable.syncevents


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1715
timetable: tt2 = syncevents ( tt )
timetable: tt2 = syncevents ( tt , defaultLabel )
timetable: tt2 = syncevents (&hellip;, 'EventDataVariables' , vars )

Copy the attached event table&rsquo;s data onto the rows it covers.

tt2 = syncevents ( tt ) adds the variables of the
event table attached to tt as variables of tt , each row
taking the values of the event covering its time. A row no event
covers takes missing values. tt must have an event table
attached.

An event covers the times from its own onwards and stops short of its
end, so an event beginning at 02:00 and lasting two hours covers 02:00
and 03:00 but not 04:00, and an event of zero length covers nothing.
An event with neither a length nor an end is an instant and covers
only a row at exactly its own time.

A row covered by more than one event is repeated , once per
event, which generally makes the result irregular.

By default every variable of the event table is copied except the one
holding the event lengths or ends, which describes the events rather
than what happened. 'EventDataVariables' names the variables
to copy instead, and replaces that default rather than adding to it,
so it can ask for the lengths and can leave the labels out.

tt2 = syncevents ( tt , defaultLabel ) gives
defaultLabel to the rows no event covers, in place of a missing
label. It reaches the labels variable alone; every other copied
variable stays missing there.

A copied variable whose name tt already uses has both of them
renamed, the timetable&rsquo;s with a _tt suffix and the event
table&rsquo;s with _et , so neither is lost to the other.

The result keeps the event table it was synchronised from.

See also:
extractevents ,
eventtable,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Copy the attached event table's data onto the rows it covers.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
timetable.synchronize


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1901
timetable: tt = synchronize ( tt1 , tt2 )
timetable: tt = synchronize ( tt1 , &hellip;, ttN )
timetable: tt = synchronize (&hellip;, newTimes )
timetable: tt = synchronize (&hellip;, method )
timetable: tt = synchronize (&hellip;, Name , Value )

Put several timetables on one set of row times and set them side by
side.

tt = synchronize ( tt1 , tt2 ) returns a
timetable holding the variables of both, at every row time either of
them carries. Any number of timetables may be given, and they must
all have row times of the same type.

newTimes says where the rows of the answer sit. It is a
datetime or duration vector, one of the time units
retime takes, 'regular' with a 'TimeStep' or a
'SampleRate' , or one of:

'union'
Every time any of them carries. This is the default.
'intersection'
Only the times every one of them carries.
'commonrange'
Every time any of them carries that lies within the span they all
cover.
'first' , 'last'
The row times of the first or of the last timetable given.

A timetable with no rows says nothing about where the answer should
sit and takes no part in choosing.

method and the options are retime &rsquo;s, and one method
serves every timetable: a method for each is not accepted.

Two timetables carrying a variable of the same name have both of them
renamed for the timetable they came from, so a from tt1
and tt2 become a_tt1 and a_tt2 . An operand that
is an expression rather than a variable is known by its place in the
call.

Where an operand is an eventtable , or carries one on its
Events property, the result is an event table too and the
operands&rsquo; event tables are merged: an outer join keyed on the event
times and every variable the two share, ordered by those keys. The
three properties saying which variables describe the events must
agree, and the operation is refused where they do not.

See also:
retime ,
timetable,
horzcat ,
isregular


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73
Put several timetables on one set of row times and set them side by side.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
timetable.tail


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 723
timetable: tail ( tt )
timetable: tail ( tt , k )
timetable: out = tail ( tt , k )

Display or return the last k rows of a timetable.

tail ( tt ) displays the last eight rows of tt , or
all of them if it has fewer. tail ( tt , k ) displays
the last k instead. k must be a real, nonnegative,
integer scalar value; a k of zero displays no rows at all rather
than raising.

out = tail ( tt , k ) returns those rows in a
new timetable instead of displaying them. If k is omitted or
empty it defaults to eight.

The rows come back in the order the timetable holds them, and they are
the last rows rather than the latest ones. The time step is read
afresh from the row times that are kept.

See also:
head ,
sortrows ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Display or return the last k rows of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
timetable.timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2552
timetable: tt = timetable ( rowTimes , var1 , &hellip;, varN )
timetable: tt = timetable ( var1 , &hellip;, varN , 'RowTimes' , rowTimes )
timetable: tt = timetable ( var1 , &hellip;, varN , 'TimeStep' , dt )
timetable: tt = timetable ( var1 , &hellip;, varN , 'SampleRate' , fs )
timetable: tt = timetable (&hellip;, 'StartTime' , t0 )
timetable: tt = timetable ( 'Size' , sz , 'VariableTypes' , varTypes , &hellip;)
timetable: tt = timetable (&hellip;, 'VariableNames' , varNames )
timetable: tt = timetable (&hellip;, 'DimensionNames' , dimNames )

Create a new timetable.

tt = timetable ( rowTimes , var1 , &hellip;,
varN ) creates a timetable whose rows are labelled by
rowTimes , a datetime or duration vector with one
element for each row, and whose variables are the remaining input
arguments. Variable names are taken from the names of the input
variables, and the row dimension is named after rowTimes itself.

tt = timetable ( var1 , &hellip;, varN ,
'RowTimes' , rowTimes ) does the same with the row times
given as a Name-Value pair, in which case the row dimension is named
'Time' .

tt = timetable ( var1 , &hellip;, varN ,
'TimeStep' , dt ) generates the row times instead of
taking them, starting at t0 and stepping by dt , a
duration or calendarDuration scalar. A calendar step
requires a datetime start time.

tt = timetable ( var1 , &hellip;, varN ,
'SampleRate' , fs ) generates them at fs rows per
second, which is the same as a TimeStep of
seconds (1 / fs ) .

tt = timetable (&hellip;, 'StartTime' , t0 )
sets the time of the first row for either of the two generating
forms. It defaults to a zero duration in the units of the
step, so that a timetable generated without one is keyed by elapsed
time rather than by date.

tt = timetable ( 'Size' , sz ,
'VariableTypes' , varTypes , &hellip;) creates a
preallocated timetable of the given size, filled with the default
value of each type. sz must be a two-element numeric array
giving the number of rows and of variables. The row times must still
be supplied, by any one of 'RowTimes' , 'TimeStep' or
'SampleRate' .

tt = timetable (&hellip;, 'VariableNames' ,
varNames ) specifies the variable names to use, as a cell array
of character vectors or a string array with one nonempty and unique
element per variable.

tt = timetable (&hellip;, 'DimensionNames' ,
dimNames ) specifies the two dimension names to use, naming the
rows and the variables.

tt = timetable () returns an empty timetable with 0 rows
and 0 variables.

See also:
table2timetable,
array2timetable,
isregular


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Create a new timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
timetable.timetable2csv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2358
timetable: timetable2csv ( tt , file )
timetable: timetable2csv ( tt , file , Name , Value )

Write a timetable to a comma-separated-value (CSV) file.

timetable2csv ( tt , file ) writes the timetable
tt to file , which may be a character vector, a cellstr, or a
string scalar. The resulting file can be read back with
csv2timetable .

The file begins with a comment line reporting how many consecutive rows
hold the variable types, names, descriptions, and units, in that order.
Those header rows are followed by one row of data per timetable row.
The variables are serialized exactly as table2csv serializes
them.

The row times lead the file as a column of their own, written in ISO
8601 form so that they are exact whatever their display format. The
column is tagged RowTimes in the variable-type row, followed by
the row times&rsquo; own type, their TimeZone where they have one, and
their Format ; the row dimension name travels in the
variable-name row beside it. A zone-aware datetime and a
duration of any resolution therefore both come back exactly as
they went out, which writetimetable does not manage for either.

The row times are not optional: a timetable without them is not one, so
there is no switch to leave them out.

The following Name - Value options are supported:

Name Value
'WriteVariableNames' A logical scalar specifying
whether the variable names are written (default true ). When
false the file carries none, so csv2timetable numbers the
variables on read and can no longer group the columns: a multicolumn
variable comes back as separate variables and a nested table as flat
columns. The row dimension name is a name too and goes with them, so
the row times come back under the default Time .

A CSV file holds one table and has nowhere to put a second, so an
attached event table is not written and nothing warns. Write
the timetable to an OpenDocument spreadsheet with timetable2ods
to keep its events. TimeStep , SampleRate and
VariableContinuity are not written either; the first two are
worked out again from the row times on read.

Note the following round-trip limitation when reading the file back
with csv2timetable : calendarDuration and
categorical variables are returned as cell arrays of character
vectors and their values are not reconstructed.

See also:
csv2timetable,
timetable2ods ,
writetimetable ,
table2csv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Write a timetable to a comma-separated-value (CSV) file.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
timetable.timetable2ods


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2760
timetable: timetable2ods ( tt , file )
timetable: timetable2ods ( tt , file , Name , Value )

Write a timetable to an OpenDocument spreadsheet file.

timetable2ods ( tt , file ) writes the timetable
tt to file , which may be a character vector, a cellstr, or a
string scalar. When file ends in .ods a compressed
(ZIP-packaged) OpenDocument spreadsheet is written; when it ends in
.fods a flat (single-XML) one is written instead. The resulting
file can be read back with ods2timetable .

The data sheet is headed by the row dimension name and the variable
names and then carries one natively typed cell per value, and a hidden
__datatypes_meta__ sheet carries the variable types,
descriptions and units, exactly as table2ods writes them.

The row times lead the sheet as a column of their own, written as
native date or time cells as a datetime or
duration variable is, so a spreadsheet application shows them as
times rather than as text. The column is tagged RowTimes in the
hidden sheet, followed by the row times&rsquo; own type, their
TimeZone where they have one, and their Format , so that
all three come back exactly.

The row times are not optional: a timetable without them is not one, so
there is no switch to leave them out.

The following Name - Value options are supported:

Name Value
'Sheet' The name of the sheet to write (default
'Sheet1' ). When file already exists the named sheet is
added or replaced while every other sheet is preserved, so a workbook
can be built up one object at a time.
'WriteVariableNames' A logical scalar specifying
whether the variable names are written (default true ). When
false the file carries none at all, the hidden metadata sheet
included, so ods2timetable numbers the variables on read and can
no longer group the columns. The row dimension name is a name too and
goes with them.
'WriteMode' 'overwritesheet' or
'inplace' replace the sheet (the default when the sheet
exists), 'append' appends the timetable&rsquo;s rows to it, and
'replacefile' discards any existing file.

An attached event table is written too, on a sheet of its own named
<sheet>_Events , with a ## Events crossref: line in the
hidden metadata sheet tying the two together and carrying the event
table&rsquo;s three variable designations. ods2timetable reads that
sheet back and attaches it, and skips it when choosing which sheet to
read. This is the only file format of the package that carries events:
timetable2csv and writetimetable drop them.

Note the following round-trip limitation when reading the file back
with ods2timetable : calendarDuration and
categorical variables are returned as cell arrays of character
vectors and their values are not reconstructed.

See also:
ods2timetable,
timetable2csv ,
struct2ods,
table2ods


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Write a timetable to an OpenDocument spreadsheet file.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
timetable.timetable2table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 993
timetable: tbl = timetable2table ( tt )
timetable: tbl = timetable2table ( tt , 'ConvertRowTimes' , tf )

Convert a timetable to a table.

tbl = timetable2table ( tt ) converts the timetable
tt to a table whose first variable is the row times,
named after the row dimension they came from. The dimension names of
the result are the defaults, 'Row' and 'Variables' , a
table labelling its rows by name rather than by time.

tbl = timetable2table ( tt , 'ConvertRowTimes' ,
tf ) keeps the row times as that first variable when tf is
true, which is the default, and discards them when it is false:
the result has only the variables, and the times are gone rather than
kept elsewhere.

An event table attached to tt is not carried across, a table having
nowhere to keep one, and converting the result back with
table2timetable does not bring it back. An eventtable
given here becomes a plain table like any other timetable.

See also:
table2timetable,
array2timetable,
timetable,
table,
eventtable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Convert a timetable to a table.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
timetable.topkrows


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1602
timetable: ttB = topkrows ( ttA , k )
timetable: ttB = topkrows ( ttA , k , vars )
timetable: ttB = topkrows ( ttA , k , vars , direction )
timetable: ttB = topkrows (&hellip;, Name , Value )
timetable: [ ttB , index ] = topkrows (&hellip;)

The top k rows of a timetable, in sorted order.

ttB = topkrows ( ttA , k ) returns the k
rows with the latest row times, latest first. This is where it parts
company with head , which takes the first rows as they are
stored: topkrows ranks them.

ttB = topkrows ( ttA , k , vars ) ranks by
one or more variables instead, named, indexed by number, selected by a
logical vector or picked out by a vartype . The row dimension
name may be used to rank by the row times explicitly. A numeric index
counts the variables, and its sign is read the other way round from
sortrows : a positive index ranks downwards.

ttB = topkrows (&hellip;, direction ) sorts as
'ascend' or 'descend' , the latter being the default
and what makes these the top rows rather than the bottom ones.

Missing keys rank last however the sort runs, which is the one place
topkrows differs from sortrows beyond its direction.
'MissingPlacement' overrides that, and
'ComparisonMethod' applies to numeric variables as usual.

Asking for more rows than there are returns all of them, still
ranked, and a k of zero returns none.

[ ttB , index ] = topkrows (&hellip;) also returns the
rows chosen, so that ttA ( index ,:) is ttB .

The time step is read afresh from the row times that are kept, so the
default ranking of a regular timetable steps backwards.

See also:
head ,
sortrows ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
The top k rows of a timetable, in sorted order.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
timetable.unique


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1276
timetable: ttB = unique ( ttA )
timetable: ttB = unique ( ttA , setOrder )
timetable: [ ttB , ia , ic ] = unique (&hellip;)

Unique rows of a timetable.

ttB = unique ( ttA ) returns the distinct rows of
ttA , ordered by row time. A row is its time together with its
values, so two rows count as one only when they agree on both. Rows
sharing a time but differing in a variable are all kept, as are rows
sharing their values at different times; the row times are a column of
the comparison and not a key that overrides it.

ttB = unique ( ttA , setOrder ) chooses the
order of the result. 'sorted' is the default and
'stable' keeps the rows in the order they were met.
'first' and 'last' say which of a set of equal rows is
the one reported in ia . 'rows' is accepted and changes
nothing, rows being the only thing a timetable compares.

[ ttB , ia , ic ] = unique (&hellip;) also returns
index vectors, such that ttB is ttA ( ia ,:) and
ttA is ttB ( ic ,:) .

A timetable with no variables is compared on its row times alone, so
repeated times reduce to one. The time step is read afresh from the
row times that survive.

Variables of cell , other than a cell array of character
vectors, and of struct have no order to compare and are
refused.

See also:
sortrows ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Unique rows of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
timetable.unstack


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1417
timetable: tt2 = unstack ( tt , vars , ivar )
timetable: tt2 = unstack ( tt , vars , ivar , Name , Value )
timetable: [ tt2 , index ] = unstack (&hellip;)

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 (&hellip;) also returns
index , naming a row of tt in each group.

The following Name / Value pairs are accepted:

'GroupingVariables'
The variables whose combinations define the rows of the result,
alongside the row times.
'ConstantVariables'
The variables carried along unchanged, taken from one row of each group.
'NewDataVariableNames'
The names of the new variables, one per distinct indicator value.
'AggregationFunction'
The function applied where a group holds several values for one
indicator. By default numeric data are summed and everything else must
be unique within its group.
'VariableNamingRule'
'modify' (the default) makes each new name a valid identifier;
'preserve' keeps it as it is.

See also:
stack ,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Spread one variable of a timetable across several.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
timetable.varfun


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1855
timetable: B = varfun ( func , A )
timetable: B = varfun ( func , A , Name , Value , &hellip;)

Apply a function to each variable of a timetable.

B = varfun ( func , A ) applies the function
handle func separately to each variable of the timetable A
and returns the results in the timetable B . Each variable is
passed whole, so a function that reduces a column to a scalar gives a
one-row result. The output variables are named for the function and
the variable they came from, as in mean_Speed , and every row of
the result carries the row time of the first row it was computed from.

B = varfun ( func , A , Name , Value ,
&hellip;) modifies the operation through the following
Name / Value pairs:

'InputVariables'
The variables of A that func is applied to, given as
variable names, indices, a logical vector, or a function handle. By
default every variable of A that is not a grouping variable is
used.
'GroupingVariables'
One or more variables of A that define groups of rows, or the row
dimension name, which groups by the row times themselves. func
is then applied once to each group and B has one row per group,
carrying the row time of the first row of the group. Grouping
variables appear in B alongside a GroupCount variable;
the row times do not, being the row times of the result. Rows with a
missing value in any grouping variable are omitted.
'OutputFormat'
One of 'table' (the default, and also selected by
'auto' ), which returns the results in a timetable;
'uniform' , which requires func to return a scalar and
returns them in an array; or 'cell' , which returns them in a
cell array.
'ErrorHandler'
A function handle called whenever func raises an error, receiving
a structure with fields identifier , message and
index , followed by the arguments func was called with.
Its outputs are used in place of the ones func did not return.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Apply a function to each variable of a timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
timetable.vertcat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1186
timetable: tt = vertcat ( tt1 , tt2 , &hellip;)

Concatenate timetables vertically.

tt = vertcat ( tt1 , tt2 , &hellip;) stacks the
rows of its inputs, which must all have the same variable names. It
is the operation [ tt1 ; tt2 ] performs.

The row times are stacked in the order the inputs are given and are
never sorted, so a later block that starts before an earlier one ends
simply makes the result irregular, as duplicate times do. The time
step is read afresh from the stacked times, so two blocks that meet
exactly keep the step they share and any other pair loses it.

A table may be stacked onto a timetable, but only after it:
its rows carry no times and are labelled with missing ones. The row
dimension is named after the first input that does not use the
default name.

Where an operand is an eventtable , or carries one on its
Events property, the result is an event table too and the
operands&rsquo; event tables are merged: an outer join keyed on the event
times and every variable the two share, ordered by those keys. The
three properties saying which variables describe the events must
agree, and the operation is refused where they do not.

See also:
horzcat ,
cat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Concatenate timetables vertically.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
timetable.width


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 265
timetable: W = width ( tt )

Number of variables in timetable.

W = width ( tt ) returns the number of variables in
the timetable tt as a scalar. It is the equivalent of
size ( tt , 2) . The row times are not a variable and are
not counted.

See also:
height ,
size


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Number of variables in timetable.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
timetable.withinrange


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1183
timetable: TF = withinrange ( tt , ref )
timetable: [ TF , whichRows ] = withinrange ( tt , ref )

True when the whole range of a timetable lies inside a range of times.

TF = withinrange ( tt , ref ) returns true when
every row time of tt lies inside ref , which is to say that
its earliest and its latest row time both do.

Whether the ends themselves count is ref &rsquo;s to say, and this is
where it tells. A timerange is half open by default, excluding
the time it ends at, so a timetable whose last row falls exactly on
that time is not within it; the same range built closed
contains that instant, and the answer turns true.

ref takes the same three forms as in containsrange : a
timerange , a timetable whose earliest and latest row
times give the range, or a datetime or duration scalar
naming one instant. A timetable is within a single instant only when
every row time it has is that instant.

[ TF , whichRows ] = withinrange (&hellip;) also returns
a column of logicals saying which rows of tt fall in ref .
When TF is true they are all true, this being the one predicate
for which the two answers agree.

See also:
containsrange ,
overlapsrange ,
timerange,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
True when the whole range of a timetable lies inside a range of times.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
timetable.writetimetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3646
timetable: writetimetable ( tt , filename )
timetable: writetimetable ( tt , filename , Name , Value )

Write a timetable to a file in the MATLAB-compatible form.

writetimetable ( tt , filename ) writes the timetable
tt to filename with no hidden metadata of any kind: one
header row of names and then one row per row of the timetable, which is
what readtimetable and MATLAB both expect. The file type follows
the extension, .txt , .csv and .dat being text
and .ods , .fods , .xlsx and .xlsm
spreadsheets, and 'FileType' overrides it.

The row times lead the file under the row dimension name, as MATLAB
writes them. They are not optional: a timetable without them is not
one, so there is no switch to leave them out, and 'WriteRowNames'
is refused because a timetable has no row names.

.ods is the OpenDocument spreadsheet format, an open standard
that LibreOffice and other applications read and write on every
platform. MATLAB is the exception and cannot be given one.
Its writetimetable refuses the extension, and its readers open an
OpenDocument file only by handing it to Excel, so a MATLAB user without
Excel cannot read one at all. A file written for a MATLAB user should
therefore be .csv or .xlsx . Everywhere else the format
is a good choice, and timetable2ods writes it losslessly and is
the only format of the package that carries an event table.

A zone-aware datetime is written in the RFC 9557 form ,
2024-03-09T22:00:00-05:00[America/New_York] , rather than as the
display string MATLAB writes. This is deviation D7 ; see the
note below for why it is better. An unzoned datetime and a
duration are written as MATLAB writes them, both of those
round-tripping through MATLAB exactly.

The following Name - Value options are supported:

Name Value
'FileType' 'text' or 'spreadsheet' ,
overriding what the extension says.
'WriteVariableNames' A logical scalar specifying
whether the header row of names is written (default true ).
'Delimiter' The field delimiter of a text file, named
( 'comma' , 'space' , 'tab' , 'semi' ,
'bar' ) or given as the character itself (default ',' ).
'QuoteStrings' 'minimal' , 'all' or
'none' , saying which text fields are quoted (default
'minimal' ).
'Sheet' The sheet of a spreadsheet to write.
'Range' The top-left cell a fresh spreadsheet write
is anchored at, in A1 notation.
'WriteMode' 'overwrite' or 'append'
for a text file; 'overwritesheet' , 'inplace' ,
'append' or 'replacefile' for a spreadsheet.

An attached event table is not written and nothing warns, as
nothing warns in MATLAB. Use timetable2ods , the only format of
the package that carries events.

Deviation D7, and why the RFC 9557 form is the better answer.
MATLAB writes a zoned datetime as its display string, so the zone
is written only when the Format happens to ask for it, and
readtimetable then reads the file back unzoned and at the wrong
instant without complaining. Measured against R2026a, no text
form of a zoned row time survives MATLAB&rsquo;s own reader : given a format
carrying the offset, MATLAB writes
2024-03-09T22:00:00-05:00 itself and then fails to read that
very file, so there is no encoding that keeps MATLAB working. The
choice is between a loud failure there and a silent one, and this
package takes the loud one. RFC 9557 is a published standard, not an
invention of ours, and it carries both the offset and the zone name: the
offset alone cannot name a zone, and the name alone cannot say which
side of a repeated hour an instant falls on, so a timestamp inside a
daylight-saving fold round-trips here and would not otherwise.

See also:
readtimetable,
timetable2ods ,
timetable2csv ,
writetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Write a timetable to a file in the MATLAB-compatible form.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
vartype


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 170
datatypes: vartype

Subscript into a table by variable type.

A utility class that facilitates subscripting table variables according to
their data type.

See also:
table


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Subscript into a table by variable type.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
vartype.varMatch


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 273
vartype: TF = varMatch ( obj , value )

Match a vartype object to a variable value.

TF = varMatch ( obj , value ) compares the class
type of the variable in value with the predefined class type in the
vartype object. If they are equal, TF is true ,
otherwise TF is false .


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Match a vartype object to a variable value.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
vartype.vartype


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 509
vartype: S = vartype ( type )

Create a subscript into table by variable type.

S = vartype ( type ) creates a subscript to select table
variables of a specified type. The input argument, type , must be a
character vector or a string scalar that specifies any type that is
accepted by the isa function, such as numeric ,
logical , integer , string , categorical , etc.
It can also be cellstr to select variables that contain cell
arrays of character vectors or numeric to select variables with
numeric values.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Create a subscript into table by variable type.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
withtol


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 355
datatypes: withtol

Subscript into a timetable by times matched within a tolerance.

A utility class that selects the rows of a timetable whose times fall
within a tolerance of the times asked for. It exists because a row time
is rarely known to the last microsecond, so asking for one exactly would
usually select nothing.

See also:
timerange,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
Subscript into a timetable by times matched within a tolerance.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
withtol.rowIndices


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 248
withtol: ix = rowIndices ( wt , rowTimes )

Return the positions in rowTimes the subscript selects.

The positions come back grouped by the time that matched them, in the
order those times were asked for, rather than in the order the rows
are held.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Return the positions in rowTimes the subscript selects.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
withtol.withtol


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 675
withtol: wt = withtol ( subscriptTimes , tol )

Create a tolerant time subscript.

wt = withtol ( subscriptTimes , tol ) creates a
subscript selecting the rows of a timetable whose times are within
tol of one of subscriptTimes . The window is closed: a row
exactly tol away is selected.

subscriptTimes may be a datetime or duration
vector, or text that reads as one. tol must be a nonnegative
duration scalar; a bare number is not accepted, there being
nothing to say what unit it is in.

The tolerance must be less than half the smallest gap between the
times asked for, so that their windows cannot overlap and no row can
be selected twice.

See also:
timerange,
timetable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Create a tolerant time subscript.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
xlsx2struct


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 843
datatypes: s = xlsx2struct ( filename )

Read every sheet of an Excel workbook into a scalar structure.

s = xlsx2struct ( filename ) reads each sheet of the Office
Open XML workbook named by filename ( .xlsx or .xlsm )
into a table and returns a scalar structure with one field per sheet,
in sheet order. Each sheet is read as by readtable (variable names
from the first row, types detected automatically); it is the inverse of
struct2xlsx .

A sheet name that is not a valid structure field name is canonicalised with
matlab.lang.makeValidName (and made unique if two names collide); when
the field name differs from the sheet name the original is stored on that
field&rsquo;s table as the 'ActualSheetName' custom property, so a
subsequent struct2xlsx restores the exact sheet name.

See also:
struct2xlsx,
readtable,
writetable,
ods2struct


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Read every sheet of an Excel workbook into a scalar structure.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
years


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 438
datatypes: D = years ( X )

Fixed-time duration in years.

D = years ( X ) returns a duration array
representing fixed-time duration years equivalent to the values in X ,
which must be a numeric array. A fixed-length year is equal to 365.2425
days.

years is also available as a method for duration arrays, in
which case it performs the opposite conversion.

See also:
duration,
days,
hours,
minutes,
seconds,
milliseconds,
duration.years


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Fixed-time duration in years.





