vput#
Purpose#
Inserts a matrix or string into a data buffer.
Format#
- dbufnew = vput(dbuf, x, xname)#
- Parameters:
dbuf (Nx1 vector) – a data buffer containing various strings and matrices. If dbuf is a scalar 0, a new data buffer will be created.
x (LxM matrix or string) – item to be inserted into dbuf.
xname (string) – the name of x, will be inserted with x into dbuf.
- Returns:
dbufnew (Kx1 vector) – the data buffer after x and xname have been inserted.
Remarks#
If dbuf already contains x, the new value of x will replace the old one.
Examples#
// Create a new data buffer and add items
dbuf = vput(0, rndn(3, 2), "X");
dbuf = vput(dbuf, "hello world", "msg");
// Replace an existing item in the buffer
dbuf = vput(dbuf, eye(3), "X");
Source#
vpack.src