Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
LinearAlgebra[ScalarMultiply] - 行列またはベクトルとスカラーの積の計算
LinearAlgebra[MatrixScalarMultiply] - 行列とスカラーの積の計算
LinearAlgebra[VectorScalarMultiply] - ベクトルとスカラーの積の計算
使い方
ScalarMultiply(A, s, ip, outopts)
MatrixScalarMultiply(A, s, ip, outopts)
VectorScalarMultiply(A, s, ip, outopts)
パラメータ
A - 行列、ベクトル
s - スカラー
ip - (オプション) BooleanOpt(inplace); 出力が入力を上書きするかどうかを指定
outopts - (オプション) outputoptions=list の形をした等式; 結果として得られるオブジェクトのコンストラクタオプション
説明
ScalarMultiply(A, s) 関数は、積 A * s を計算します。
A が、n x m 行列で B := ScalarMultiply(A,s) のとき、i=1..n と j=1..m に対して B[i,j]=A[i,j]*s です。
A が行列のとき、ScalarMultiply(A, s) 関数は、MatrixScalarMultiply(A, s) 関数と同等です。
A が n 次元ベクトルで B := ScalarMultiply(A,s) のとき、i=1..n に対して B[i]=A[i]*s です。
A がベクトルのとき、 ScalarMultiply(A, s) 関数は、VectorScalarMultiply(A, s) 関数と同等です。
inplace オプション (ip) は結果が返される場所を決めます。inplace=true が与えられれば、結果は最初の引数に上書きされます。 inplace=false が与えられるか、または呼び出し手順に含まれていないときは、結果は新しい行列(あるいはベクトル)として返されます。
inplace=true という条件は、inplace と略記することができます。
inplace オプションは、注意して使わなければいけません。なぜなら、演算が失敗すれば元の行列(あるいはベクトル)の引数は壊れててしまうかもしれないからです。
outputoptions オプション (outopts) は、結果を作成する Matrix (あるいは Vector) コンストラクタに付加情報 (readonly, shape, storage, order, datatype, attributes) を与えます。
inplace と outputoptions オプションは両立しません。
この関数は LinearAlgebra パッケージの一部ですから、 with(LinearAlgebra) を実行した後にのみ ScalarMultiply(..) の形で使うことができます。ただし、長い形の名前 LinearAlgebra[ScalarMultiply](..) を使えばいつでもアクセスすることができます。
これらの関数は、同等なショートカット A.s を持ちます。(型 algebraic の任意の式を scalar として扱うが、型 rtable の式を scalar として扱わない、その一方で、dot 演算は constant の型のオブジェクトだけをスカラーとして扱うという例外があります)。 詳しくは、dot 演算を参照してください。
例
with(LinearAlgebra): A := <<sx,0,0>|<0,sy,0>|<0,0,1>>;
ScalarMultiply(A,2);
MatrixScalarMultiply( IdentityMatrix(2), a );
v := <alpha|beta|0>;
VectorScalarMultiply(v,1/2);
参照
Matrix, Vector, type[scalar], LinearAlgebra[Multiply], dot, type[BooleanOpt]
Download Help Document