Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - 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 >> Scilab > Scilab keywords > minus

minus

(-) subtraction operator, sign changes

Calling Sequence

X-Y
-Y

Arguments

X

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

Y

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

Description

Subtraction

For numeric operands subtraction as its usual meaning. If one of the operands is a matrix and the other one a scalar then the operation is performed element-wise. For X - Y, if Y==[] then X is returned; if X==[] then -Y is returned.

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

Examples

[1,2]-1
[]-2

%s-2
1/%s-2

See Also

  • addf — symbolic addition
  • mtlb_mode — switch Matlab like operations
  • plus — (+) addition operator
  • overloading — display, functions and operators overloading capabilities
Report an issue
<< less Scilab keywords not >>

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:
Fri Apr 11 14:06:47 CEST 2014