Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - Français

Change language to:
English - 日本語 - 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

Aide de Scilab >> Scilab > Mots clés Scilab > equal

equal

(=) assignment , comparison, equal sign

Description

Assignment:

The equal sign = is used to denote the assignment of value(s) to variable(s). The syntax can be :

  • a=expr where a is a variable name and expr a scilab expression which evaluates to a single result;

  • [a,b,...]=expr where a,b,... are variable names and expr a scilab expression which results in as many results as given variable names.

Comparison:

The equal sign = is also used in the comparison operators:

  • a==b denotes equality comparison between the values of the expressions a and b;

  • a~=b denotes inequality comparison between the values of the expressions a and b;

  • a<=b and a>=b denote ordering comparison between the values of the expressions a and b.

See comparison for semantic details.

Examples

a = sin(3.2)
M = [2.1,3.3,8.5;7.6,6.7,6.9;0,6.3,8.8];
[u,s] = schur(M)
2*2 == 4
[1:10] == 4
"foo" == "bar"
sparse([1,2;4,5;3,10],[1,2,3]) == sparse([1,2;4,5;3,10],[1,2,3])
1~=2

See Also

  • less — (<) less than comparison
  • greater
  • boolean — Objets Scilab, variables booléennes et opérateurs & | ~
  • isequal — objects comparison
  • comparison — comparison, relational operators
Report an issue
<< dollar Mots clés Scilab less >>

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:14:48 CEST 2014