Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - 日本語


vec2var

Transform a vector of double into a scilab variable

Syntax

var = vec2var(vec)

Arguments

vec
A vector of real numbers.

var
Can be a Double, Integer, Boolean, String or List Scilab object.

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 register of real parameters (rpar) and with the discrete state register (z).

Examples

a = list("cos", [1.1 2])
b = var2vec(a); b'
c = vec2var(b)
--> a = list("cos", [1.1 2])
 a  =
  (1) = "cos"
  (2) = [1.1,2]

--> b = var2vec(a); b'
 ans  =
   15.   2.   10.   2.   1.   1.   1.   0.   1.   2.   1.   2.   0.   1.1   2.

--> c = vec2var(b)
 c  =
  (1) = "cos"
  (2) = [1.1,2]
 

See also

  • var2vec — Transform a scilab variable into a vector of double
Report an issue
<< var2vec Scilab Utilities Functions xcosAddToolsMenu >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:54:23 CEST 2024