Description Usage Arguments Value Examples
Test whether an input is a vector, and if so, transform it into a array with its second and third dimension lengths equal to 1.
If an input is neither a vector nor a 3-dimensional array, returns NULL
with an error message.
1 | v_to_3d(v, obj.name)
|
v |
a vector or an array |
obj.name |
a string used to display the error message |
a list containing the following components
res.arr
Corresponding 3-dimensional array. If the input is not right, this contains NULL
err.stat
Error status variable, taking 1 if the input it not right. Otherwise, this equals 0.
err.msg
Error message to display if err.stat = 1
. This contains an empty string if err.stat = 0
.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.