Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.1 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Xcos > Scilab Utilities Functions > vec2var

vec2var

Transform a vector of double into a scilab variable

Syntax

var = vec2var(vec)

Arguments

  • vec: input parameter. A vector of real numbers.

  • var: output parameter. Can be any types of Scilab objects.

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).

var = vec2var(vec)

Example

-->a = list("cos", [1.1 2])
a  =
a(1)
cos
a(2)
1.1    2.
-->b = var2vec(a)
b  =
15.
2.
10.
2.
1.
1.
1.
0.
1.
2.
1.
2.
0.
1.1
2.
-->c = vec2var(b)
c  =
c(1)
cos
c(2)
1.1    2.
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 Feb 12 19:26:58 CET 2018