Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.2 - 日本語

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

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

Scilabヘルプ >> Scilab > Scilab keywords > plus (+)

plus (+)

数値の加算。 テキストの連結(グループ化)

呼出し手順

X + Y
str1 + str2

引数

X,Y

数値,多項式または有理数のスカラーまたはベクトルまたは行列. syslin リストとすることも可能

str1, str2

2つのテキスト、ベクトル、またはテキストの行列。

説明

数値オペランドの場合、加算は通常の意味を持ちます。

Adding booleans together or to numbers of integer, decimal or complex type performs the implicit conversions %F => 0 and %T => 1 before processing. The result has the type of the input numbers, or is decimal for booleans added together.

2つのテキストの場合、+はそれらを連結します(glues)。

オペランドが配列であり、もう一方がスカラーの場合、スカラーが適用されます アレイの各構成要素に追加(接着または接着)される。

オペランドが空の行列[]である場合、結果は[]です。

加算演算子は、他のデータ型に拡張することができます (overloading).

[1, 2] + 1
[] + 2
%s + 2
1/%s + %s
"con" + ["catenate" "crete" "sole"]
--> [1, 2] + 1
 ans  =
   2.   3.

--> [] + 2
 ans  =
    []

--> %s + 2
 ans  =
   2 +s

--> 1/%s + %s
 ans  =
        2
   1 + s
   ------
     s

--> "con" + ["catenate" "crete" "sole"]
 ans  =
!concatenate  concrete  console  !

With booleans:

[%f %f %t %t] + [%f %t %f %t]
%f + [-1 0 2 %i]
%t + [-1 0 2 %i]
--> [%f %f %t %t] + [%f %t %f %t]
 ans  =
   0.   1.   1.   2.

--> %f + [-1 0 2 %i]
 ans  =
  -1.   0.   2.   i

--> %t + [-1 0 2 %i]
 ans  =
   0.   1.   3.   1. + i

参照

  • minus — (-) 減算演算子, 符号変更
  • operators — scilab 演算子の名前
  • overloading — 表示,関数および演算子オーバーロード機能
  • oldEmptyBehaviour — Controls the operation+ and operation- behaviour for Scilab
  • mtlb_a — Matlab addition emulation function

履歴

バージョン記述
6.0.0 A + [] now returns [] instead of A
Report an issue
<< parentheses Scilab keywords quote >>

Copyright (c) 2022-2023 (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:
Thu Feb 14 15:01:59 CET 2019