Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.3 - 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.
However, this page did not exist in the previous stable version.

Scilab help >> Scilab > Scilab keywords > parents

parents

( ) left and right parenthesis

Calling Sequence

(expression)
[...]=func(e1,e2,...)
[x1,x2,...]=(e1,e2,...)
x(i,j)
v(i)
[...]=l(i)

Arguments

x

matrix of any possible type

v

row or column vector of any possible type

l

list variable

func

any function name

e1,e2,...

any possible type expression

Description

Left and right parenthesis are used to

* Specify evaluation order within expressions,

* Form right-hand-side functions argument list. Within multiple rhs arguments must be separated by comma.

* Select elements within vectors, matrices and lists. see help on extraction and insertion for more precisions

* [x1,x2,...]=(e1,e2,...) is equivalent to first performing %t_1 = e1, %t_2 = e2, ..., and then x1 = %t_1, x2 = %t_2, ..., where the variables %t_i, i = 1, 2, ... are invisible to the user.

Examples

3^(-1)
x=poly(0,"x");
//
(x+10)/2
i3=eye(3,3)
//
a=[1 2 3;4 5 6;7 8 9],a(1,3),a([1 3],:),a(:,3)
a(:,3)=[]
a(1,$)=33
a(2,[$ $-1])
a(:,$+1)=[10;11;12]
//
w=ssrand(2,2,2);ssprint(w)
ssprint(w(:,1))
ss2tf(w(:,1)) 
//
l=list(1,2,3,4)
[a,b,c,d]=l(:)
l($+1)='new'
//
v=%t([1 1 1 1 1])
//
[x,y,z]=(1,2,3)

See Also

  • colon — (:) colon operator
  • comma — (,) column, instruction, argument separator
  • brackets — ([,]) left and right brackets
  • list — Scilab object and list function definition
  • extraction — matrix and list entry extraction
  • insertion — partial variable assignation or modification
<< not Scilab keywords percent >>

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:
Wed Oct 05 12:09:25 CEST 2011