append_#
- swordfish.function.append_()#
Append newData to obj.
- Parameters:
obj (Constant) – A vector/tuple/matrix/table/set
newData (Constant) –
A scalar/vector/tuple/table/set.
If obj is a vector, newData is a scalar, vector, or tuple whose elements are of the same type as obj. The result is a vector longer than obj.
If obj is a tuple, newData is a scalar, vector or tuple:
If newData is a vector, it is appended to obj as one tuple element;
If newData is a tuple, the appendTupleAsAWhole configuration parameter controls whether it is appended to obj as one tuple element (true) or each of its elements is appended independently (false).
If obj is a matrix, newData is a vector whose length must be a multiple of the number of rows of obj. The result is a matrix with the same number of rows as obj but with more columns.
If obj is a table, newData is a table with the same number of columns as obj. The result is a table with the same number and name of columns as obj but with more rows.
If newData and obj are of different data forms,
append_will attempt to convert newData to the same data form as obj. If it is not possible, return an error message.