Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - Русский - 日本語
Scilab Help >> Scilab > Scilab keywords > plus

plus

(+) addition operator

Syntax

X+Y
str1+str2

Arguments

X,Y

scalar or vector or matrix of numbers, polynomials or rationals. It may also be a syslin list

str1,str2

a character string, a vector or a matrix of character strings

Description

Addition.

For numeric operands addition as its usual meaning. If one of the operands is a matrix and the other one a scalar the scalar is added to each matrix entries. If one of the operands is an empty matrix the empty matrix [] is returned).

For character strings + means concatenation.

Addition may also be defined for other data types through "soft-coded" operations (see overloading).

Examples

[1,2]+1
[]+2
s=poly(0,"s");
s+2
1/s+2
"con"+"cat"+"enate"

See Also

  • mtlb_mode — switch Matlab like operations
  • overloading — display, functions and operators overloading capabilities

History

VersionDescription
6.0.0 Modified the behaviour of A + [] to be the empty matrix [] instead of A
Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:27:30 CEST 2016