var2vec
Transform a scilab variable into a vector of double
Syntax
vec = var2vec(var)
Arguments
- var
- Can be a Double, Integer, Boolean, String or List Scilab object.
- vec
- A vector of real numbers.
Description
var2vec / vec2var functions are used inside the interfacing functions of Scilab blocks to give the possibility to the user to handle Scilab objects with the real parameter (rpar) and with the discrete state register (z).
These functions are also used internally for some fields in blocks (odstate, opar, etc...).
The serialized data are supposed to be accessible by the simulation function.
For complex Scilab objects (struct, handle, file content, etc...), you could store
identifiers or global variables as strings and resolve them on your simulation function. |
Examples
a = list("cos", [1.1 2]) b = var2vec(a)
--> a = list("cos", [1.1 2]) a = (1) = "cos" (2) = [1.1,2] --> b = var2vec(a) b = 15. 2. 10. 2. 1. 1. 1. 0. 1. 2. 1. 2. 0. 1.1 2.
See also
- vec2var — Transform a vector of double into a scilab variable
Report an issue | ||
<< standard_outputs | Fonctions utilitaires Scilab | vec2var >> |