Save input values in uint8 arrays in Octaves binary save format.
This function returns as many output variables as input variables are given.
The function can be used to prepare storage of Octave variable
values as binary strings in a database, if the variables types have
no corresponding SQL type.
Each variable type which can be correctly saved and loaded with
Octaves save
and load
functions is acceptable.
The variable value can be restored with the function
bytea2var
.
Note that the inputs are not variable names, but values.
No variable names are saved.
Loading the uint8 array with load
(possibly after dumping
it to a file) will not work.
Example: to convert the first and third column of a cell-array c
,
[c{:, [1, 3]}] = var2bytea (c{:, [1, 3]});
can be used.
See also: bytea2var.
Package: database