From 291c35bc1c02fe79952f0dbfb767b02f7612d40f Mon Sep 17 00:00:00 2001 From: Samuel GOUGEON Date: Fri, 1 Jan 2021 19:30:30 +0100 Subject: [PATCH] [doc] power() improved page en_US PDF: http://bugzilla.scilab.org/attachment.cgi?id=5211 Change-Id: I31f2963d5b8967cb27215a19670df1cb503e6ce8 --- .../help/en_US/exponential/power.xml | 281 ++++++++++++------- .../help/fr_FR/exponential/power.xml | 241 ++++++++++++---- .../help/ja_JP/exponential/power.xml | 291 +++++++++++++------- .../help/pt_BR/exponential/power.xml | 106 ------- .../help/ru_RU/exponential/power.xml | 254 +++++++++++++---- 5 files changed, 742 insertions(+), 431 deletions(-) delete mode 100644 scilab/modules/elementary_functions/help/pt_BR/exponential/power.xml diff --git a/scilab/modules/elementary_functions/help/en_US/exponential/power.xml b/scilab/modules/elementary_functions/help/en_US/exponential/power.xml index 2384b7a..4c74ea6 100644 --- a/scilab/modules/elementary_functions/help/en_US/exponential/power.xml +++ b/scilab/modules/elementary_functions/help/en_US/exponential/power.xml @@ -1,138 +1,196 @@ - + + power (^,.^) power operation Syntax - t=A^b - t=A**b - t=A.^b + + t = A ^ b + t = A ** b + t = A .^ b Arguments - A,t + A, t - scalar, polynomial or rational matrix. + a scalar, vector, or matrix of encoded integers, decimal or complex numbers, + polynomials, or rationals. + b - a scalar, a vector or a scalar matrix. + a scalar, vector, or matrix of encoded integers, decimal or complex numbers. + - - - Description - - - - If A is a square matrix and b is a scalar then A^b is the matrix A to the power b. - - - - - If b is a scalar and A a matrix then - A.^b is the matrix formed by the element of - A to the power b (element-wise power). If - A is a vector and b is a scalar then - A^b and A.^b performs the same operation - (i.e. element-wise power). - - - - - If A is a scalar and b is a square matrix A^b is the matrix expm(log(A) * b). - - - If A is a scalar and b is a vector A^b and A.^b are the vector formed by a^(b(i,j)). - - - If A is a scalar and b is a matrix A.^b is the matrix formed by a^(b(i,j)). - - - - - If A and b are vectors (matrices) of the same size A.^b is the A(i)^b(i) vector (A(i,j)^b(i,j) matrix). - - - - - - Additional Remarks - - Notes: - - - 1. For square matrices A^p is computed through successive matrices - multiplications if p is a positive integer, and by diagonalization if not (see "note 2 and 3" below for details). - - - 2. If A is a square and Hermitian matrix and p is a non-integer scalar, - A^p is computed as: - - - A^p = u*diag(diag(s).^p)*u' (For real matrix A, only the real part of the answer is taken into account). - - - u and s are determined by [u,s] = schur(A) . - - - 3. If A is not a Hermitian matrix and p is a non-integer scalar, - A^p is computed as: - - - A^p = v*diag(diag(d).^p)*inv(v) (For real matrix A, only the real part of the answer is taken into account). - - - d and v are determined by [d,v] = bdiag(A+0*%i) . - - - 4. If A and p are real or complex numbers, - A^p is the principal value determined by: - - - A^p = exp(p*log(A)) (or A^p = exp(p*(log(abs(A))+ %i*atan(imag(A)/real(A)))) ). - - 5. If A is a square matrix and p is a real or complex number, - A.^p is the principal value computed as: + If an operand are encoded integers, the other one can be only encoded integers or real + numbers. - A.^p = exp(p*log(A)) (same as case 4 above). - - - 6. ** and ^ operators are synonyms. - - - - Exponentiation is right-associative in Scilab contrarily to Matlab® and Octave. - For example 2^3^4 is equal to 2^(3^4) in Scilab but is equal to (2^3)^4 in Matlab® - and Octave. - + If A are polynomials or rationals, b can only be + a single decimal (positive or negative) integer. + Description + + .^ by-element power + + If A or b is scalar, it is first + replicated to the size of the other, with A*ones(b) or b*ones(A). + Otherwise, A and b must have the same size. + + + Then, for each element of index i, t(i) = A(i)^b(i) + is computed. + + + + ^ matricial power + + The ^ operator is equivalent to the .^ by-element power in the following cases: + + + A is scalar and b is a vector. + + + A is a vector and b is scalar. + + + Otherwise, A or b must be a scalar, + and the other one must be a square matrix: + + + + If A is scalar and b is + a square matrix, then A^b is the matrix + expm(log(A) * b) + + + + + If A is a square matrix and b + is scalar, then A^b is the matrix + A to the power b. + + + + + + + Remarks + + + + For square matrices A^p is computed through successive + matrices multiplications if p is a positive integer, and by + diagonalization if not (see "note 2 and 3" below for details). + + + + + If A is a square and Hermitian matrix and p + is a non-integer scalar, A^p is computed as: + + + A^p = u*diag(diag(s).^p)*u' (For real matrix A, + only the real part of the answer is taken into account). + + + u and s are determined by + [u,s] = schur(A) . + + + + + If A is not a Hermitian matrix and p is a + non-integer scalar, A^p is computed as: + + + A^p = v*diag(diag(d).^p)*inv(v) (For real matrix A, + only the real part of the answer is taken into account). + + + d and v are determined by + [d,v] = bdiag(A+0*%i). + + + + + If A and p are real or complex numbers, + A^p is the principal value determined by + + + A^p = exp(p*log(A)) + + + (or A^p = exp(p*(log(abs(A))+ %i*atan(imag(A)/real(A)))) ). + + + + + If A is a square matrix and p is a real or + complex number, A.^p is the principal value + computed as: + + + A.^p = exp(p*log(A)) (same as case 4 above). + + + + + ** and ^ operators are synonyms. + + + + + + Exponentiation is right-associative in Scilab, contrarily to Matlab® and Octave. + For example 2^3^4 is equal to 2^(3^4) in Scilab, but to (2^3)^4 in Matlab® and Octave. + + + + + Examples @@ -142,8 +200,27 @@ s^(1:10) exp + expm + + hat + + inv + + + History + + + 6.0.0 + + With decimal or complex numbers, scalar ^ squareMat now + yields expm(log(scalar)*squareMat) instead of + scalar .^ squareMat + + + + diff --git a/scilab/modules/elementary_functions/help/fr_FR/exponential/power.xml b/scilab/modules/elementary_functions/help/fr_FR/exponential/power.xml index 4872795..5760fcf 100644 --- a/scilab/modules/elementary_functions/help/fr_FR/exponential/power.xml +++ b/scilab/modules/elementary_functions/help/fr_FR/exponential/power.xml @@ -1,5 +1,21 @@ - + + power élévation à la puissance (^,.^) @@ -7,87 +23,177 @@ Séquence d'appel - t=A^b - t=A**b - t=A.^b + t = A ^ b + t = A ** b + t = A .^ b Paramètres - A,t + A, t - matrice réelle, complexe, polynomiale ou rationnelle - + scalaire, vecteur, ou matrice de nombres entiers encodés, de nombres + ou polynômes ou fractions rationnelles à coefficients réels ou complexes. + b - matrice réelle, complexe, polynomiale ou rationnelle - + scalaire, vecteur, ou matrice d'entiers encodés, de nombres décimaux, + ou de nombres complexes. + - - - Description - - - - Si A est une matrice carrée et b un scalaire alors A^b est la matrice A élevée à la puissance b. - - - - - Si b est un un scalaire et A une matrice alors A.^b est la matrice formée par les éléments de A élevés à la puissance b (puissance élément par élément). Si A est un vecteur et b un scalaire alors A^b et A.^b donnent le même résultat (puissance élément par élément). - - - - - Si A est un scalaire et b est une matrice carrée A^b est la matrice expm(log(A)*b). - - - Si A est un scalaire et b est une matrice A.^b est une matrice de même taille que b dont les termes sont égaux à a^(b(i,j)). - - - - - Si A et b sont des matrices de même taille A.^b est la matrice dont les termes sont égaux à A(i,j)^b(i,j). - - - - Notes : + Si un opérande sont des entiers encodés, l'autre peut être uniquement des entiers + encodés ou des nombres réels. - - - Pour les matrices carrées A^p est calculé par multiplications successives si p est un entier positif, et par diagonalisation sinon. - - - - - Les opérateurs ** et ^ sont synonymes. - - - - L'élévation à la puissance est associative à droite dans Scilab contrairement à - Matlab® et Octave. Par exemple 2^3^4 est égal à 2^(3^4) dans Scilab mais est égal à - (2^3)^4 dans Matlab® et Octave. - + Si A sont des polynômes ou des fractions rationnelles, + b peut uniquement être un entier décimal (positif ou négatif). + Description + + .^ : puissances respectives par élément + + Si A ou b est scalaire, il est préalablement + répliqué à la taille de l'autre, par A*ones(b) ou b*ones(A). + Sinon, A et b doivent avoir la même taille. + + + Alors, pour chaque élément numéro i, t(i) = A(i)^b(i) + est calculé. + + + + ^ : puissance matricielle + + L'opérateur ^ est équivalent à .^ dans les cas suivants : + + + A est scalaire et b est un vecteur. + + + A est un vecteur et b est scalaire. + + + Sinon, A ou b doit être scalaire, et l'autre + opérande doit être une matrice carrée : + + + + Si A est scalaire et b est carrée, + alors A^b est la matrice + expm(log(A) * b) + + + + + Si A est carrée et b est scalaire, + alors A^b est la matrice + A à la puissane b. + + + + + + + Autres remarques + + + + Si A est une matrice carrée, A^p est + calculé par multiplications successives si p est un + entier positif, et par diagonalisation sinon (détails en remarques n°2 et 3 + ci-dessous). + + + + + If A is a square and Hermitian matrix and p + is a non-integer scalar, A^p is computed as: + + + A^p = u*diag(diag(s).^p)*u' (For real matrix A, + only the real part of the answer is taken into account). + + + u and s are determined by + [u,s] = schur(A) . + + + + + If A is not a Hermitian matrix and p is a + non-integer scalar, A^p is computed as: + + + A^p = v*diag(diag(d).^p)*inv(v) (For real matrix A, + only the real part of the answer is taken into account). + + + d and v are determined by + [d,v] = bdiag(A+0*%i). + + + + + If A and p are real or complex numbers, + A^p is the principal value determined by + + + A^p = exp(p*log(A)) + + + (or A^p = exp(p*(log(abs(A))+ %i*atan(imag(A)/real(A)))) ). + + + + + If A is a square matrix and p is a real or + complex number, A.^p is the principal value + computed as: + + + A.^p = exp(p*log(A)) (same as case 4 above). + + + + + Les opérateurs ** et ^ sont équivalents. + + + + + + L'élévation à la puissance est associative à droite dans Scilab contrairement à + Matlab® et Octave. Par exemple 2^3^4 est égal à 2^(3^4) dans Scilab mais est égal à + (2^3)^4 dans Matlab® et Octave. + + + + + Exemples @@ -97,8 +203,27 @@ s^(1:10) exp + expm + + hat + + inv + + + Historique + + + 6.0.0 + + Avec des nombres décimaux ou complexes, scalaire ^ matriceCarrée + produit désormais expm(log(scalaire)*matriceCarrée) au lieu + de scalaire .^ matriceCarrée. + + + + diff --git a/scilab/modules/elementary_functions/help/ja_JP/exponential/power.xml b/scilab/modules/elementary_functions/help/ja_JP/exponential/power.xml index 28ad413..bab3fc1 100644 --- a/scilab/modules/elementary_functions/help/ja_JP/exponential/power.xml +++ b/scilab/modules/elementary_functions/help/ja_JP/exponential/power.xml @@ -1,142 +1,202 @@ - + + power 指数演算子 (^,.^) 呼出し手順 - t=A^b - t=A**b - t=A.^b + + t = A ^ b + t = A ** b + t = A .^ b 引数 - A,t + A, t - スカラー, 多項式または有理行列. + a scalar, vector, or matrix of encoded integers, decimal or complex numbers, + polynomials, or rationals. + b - スカラー, ベクトルまたはスカラーの行列. + a scalar, vector, or matrix of encoded integers, decimal or complex numbers. + - - - 説明 - - - - A が正方行列でb がスカラーの場合, - A^bは行列Aのb乗に - なります. - - - - - b がスカラーでAが行列の場合, - A.^bはAの各要素をb乗 - (要素毎の累乗)にした行列となります. - A がベクトルで b がスカラーの場合, - A^b と A.^b は同じ意味となります - (すなわち,要素毎の累乗). - - - - - A がスカラーで,b が行列 (またはベクトル)の場合, - A^b および A.^b は, - a^(b(i,j)) により構成される行列 (またはベクトル) となります. - - - - - A および b が同じ大きさのベクトル (行列) の場合, - A.^b はベクトル A(i)^b(i) - (行列A(i,j)^b(i,j))となります. - - - - - - 追加の注記 - - 注意: - - - 1.正方行列の場合, A^pは, - pが正のスカラーの場合は行列の逐次乗算により計算され, - それ以外の場合,対角化により計算されます - (詳細は"注記2および3"を参照). - - - 2. Aが正方かつエルミート行列で - p が整数でないスカラーの場合, - A^p は以下の様に計算されます: - - - A^p = u*diag(diag(s).^p)*u' (Aが実数行列の場合, - 答えの実部のみが考慮されます). - - - uおよびs は, [u,s] = schur(A) - により定義されます. - - - 3. A がエルミート行列でなく, - p が非整数スカラーの場合, - A^p は以下の様に計算されます: - - - A^p = v*diag(diag(d).^p)*inv(v) - (Aが実数行列の場合, 答えの実部のみが考慮されます). - - - d および v は, - [d,v] = bdiag(A+0*%i)により定義されます. - - 4. A および p が実数または複素数の場合, - A^p は以下のように計算される - 主値となります: + If an operand are encoded integers, the other one can be only encoded integers or real + numbers. - A^p = exp(p*log(A)) (またはA^p = exp(p*(log(abs(A))+ %i*atan(imag(A)/real(A)))) ). - - - 5. A が正方行列で - p が実数または複素数の場合, - A.^p は以下のように計算される - 主値 となります: - - - A.^p = exp(p*log(A)) (上記のケース4と同じ). - - - 6. ** および ^ 演算子は同義です. + If A are polynomials or rationals, b can only be + a single decimal (positive or negative) integer. + 説明 + + .^ by-element power + + If A or b is scalar, it is first + replicated to the size of the other, with A*ones(b) or b*ones(A). + Otherwise, A and b must have the same size. + + + Then, for each element of index i, t(i) = A(i)^b(i) + is computed. + + + + ^ matricial power + + The ^ operator is equivalent to the .^ by-element power in the following cases: + + + A is scalar and b is a vector. + + + A is a vector and b is scalar. + + + Otherwise, A or b must be a scalar, + and the other one must be a square matrix: + + + + If A is scalar and b is + a square matrix, then A^b is the matrix + expm(log(A) * b) + + + + + If A is a square matrix and b + is scalar, then A^b is the matrix + A to the power b. + + + + + + + 追加の注記 + + + + 正方行列の場合, A^pは, + pが正のスカラーの場合は行列の逐次乗算により計算され, + それ以外の場合,対角化により計算されます + (詳細は"注記2および3"を参照). + + + + + Aが正方かつエルミート行列で + p が整数でないスカラーの場合, + A^p は以下の様に計算されます: + + + A^p = u*diag(diag(s).^p)*u' (Aが実数行列の場合, + 答えの実部のみが考慮されます). + + + uおよびs は, [u,s] = schur(A) + により定義されます. + + + + + A がエルミート行列でなく, + p が非整数スカラーの場合, + A^p は以下の様に計算されます: + + + A^p = v*diag(diag(d).^p)*inv(v) + (Aが実数行列の場合, 答えの実部のみが考慮されます). + + + d および v は, + [d,v] = bdiag(A+0*%i)により定義されます. + + + + + A および p が実数または複素数の場合, + A^p は以下のように計算される + 主値となります: + + + A^p = exp(p*log(A)) + + + (またはA^p = exp(p*(log(abs(A))+ %i*atan(imag(A)/real(A)))) ). + + + + + A が正方行列で + p が実数または複素数の場合, + A.^p は以下のように計算される + 主値 となります: + + + A.^p = exp(p*log(A)) (上記のケース4と同じ). + + + + + ** および ^ 演算子は同義です. + + + + + + Exponentiation is right-associative in Scilab, contrarily to Matlab® and Octave. + For example 2^3^4 is equal to 2^(3^4) in Scilab, but to (2^3)^4 in Matlab® and + Octave. + + + + + 例 @@ -146,8 +206,27 @@ s^(1:10) exp + expm + + hat + + inv + + + 履歴 + + + 6.0.0 + + With decimal or complex numbers, scalar ^ squareMat now + yields expm(log(scalar)*squareMat) instead of + scalar .^ squareMat + + + + diff --git a/scilab/modules/elementary_functions/help/pt_BR/exponential/power.xml b/scilab/modules/elementary_functions/help/pt_BR/exponential/power.xml deleted file mode 100644 index 8857645..0000000 --- a/scilab/modules/elementary_functions/help/pt_BR/exponential/power.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - power - operação de potenciação(^,.^) - - - Seqüência de Chamamento - t=A^b - t=A**b - t=A.^b - - - - Parâmetros - - - A,t - - matriz de escalares, polinômios ou razões de - polinômios. - - - - - b - - um escalar ou um vetor ou matriz de escalares. - - - - - - Descrição - - - - "(A:square)^(b:scalar)"Se - A é uma matriz quadrada e b é um - escalar, então A^b é a matriz A - elevada à potência b. - - - - - "(A:matrix).^(b:scalar)"Se - b é um escalar e A uma matriz, - então A.^b é formada pelos elementos de - A elevados à potência b - (potenciação elemento a elemento). Se A é um vetor - e b é um escalar, então A^b e - A.^b realizam a mesma operação (i.e., potenciação - elemento a elemento). - - - - - "(A:scalar).^(b:matrix)" Se - A é um escalar e b é uma matriz - (ou vetor) então A^b e A.^b são - as matrizes (ou vetores) formados por - a^(b(i,j)) - - . - - - - - "(A:matrix).^(b:matrix)" Se - A e b são vetores (matrizes) de - mesmo tamanho A.^b é o vetor - A(i)^b(i) (matriz - A(i,j)^b(i,j)). - - - - Notas: - - - Para matrizes quadradas A^p é computada através - de sucessivas multiplicações de matrizes se p is é um - número inteiro positivo e por diagonalização se não for. - - - Os operadores ** e ^ são sinônimos. - - - Exemplos - - - - Ver Também - - - exp - - - - diff --git a/scilab/modules/elementary_functions/help/ru_RU/exponential/power.xml b/scilab/modules/elementary_functions/help/ru_RU/exponential/power.xml index e62bb7c..1c30650 100644 --- a/scilab/modules/elementary_functions/help/ru_RU/exponential/power.xml +++ b/scilab/modules/elementary_functions/help/ru_RU/exponential/power.xml @@ -1,5 +1,21 @@ - + + возведение в степень операция возведения в степень (^, .^) @@ -7,88 +23,189 @@ Синтаксис - t=A^b - t=A**b - t=A.^b + t = A ^ b + t = A ** b + t = A .^ b Аргументы - A,t + A, t - - скаляр или вектор/матрица числовых, полиномиальных или рациональных значений - + скаляр, вектор или матрица кодированных целых чисел, десятичных или + комплексных чисел, полиномов или дробно-рациональных выражений. + b - скаляр, вектор или матрица. + скаляр, вектор или матрица кодированных целых чисел, десятичных или + комплексных чисел. + - - - Описание - - - - Если A -- квадратная матрица, а b -- скаляр, то A^b - является матрицей A в степени b. - - - - - Если A -- матрица, а b -- скаляр, то матрица - A.^b формируется элементами матрицы A - в степени b (поэлементное возведение в степень). - Если A -- вектор, а b -- скаляр, то - A^b и A.^b выполняют одну и ту же операцию - (т. е. поэлементное возведение в степень). - - - - - Если A -- скаляр, а b -- матрица (или вектор), то - A^b и A.^b являются матрицами (или векторами), сформированными - элементами a^(b(i,j)). - - - - - Если A и b -- векторы (матрицы) одного размера, то - A.^b равно A(i)^b(i) (векторы) или A(i,j)^b(i,j) (матрицы). - - - - - Примечания: - - - - Для квадратных матриц A^p вычисляется через последовательное - перемножение матриц, если p является положительным числом, а иначе -- - через диагонализацию. + Если операндом являются кодированные целые числа, то другие числа могут + быть только кодированными целыми числами или вещественными числами. - - - операторы ** и ^ являются синонимами. + Если A является полиномами или дробно-рациональными + выражениями, то b может быть только одиночным десятичным + (положительным или отрицательным) числом. + Описание + + .^ поэлементное возведение в степень + + Если A или b скаляр, + то он сначала реплицируется до размера другого с помощью + A*ones(b) или b*ones(A). + В противном случае A и b + должны быть одинакового размера. + + + Затем для каждого элемента с индексом i + вычисляется t(i) = A(i)^b(i). + + + + ^ матричное возведение в степень + + Оператор ^ эквивалентен поэлементному возведению + в степень .^ в следующих случаях: + + + A скаляр, а b вектор; + + + A вектор, а b скаляр. + + + В противном случае A либо b + должен быть скаляром, а другой должен быть квадратной матрицей: + + + + если A скаляр, а b + квадратная матрица, то A^b является + матрицей expm(log(A) * b); + + + + + если A квадратная матрица, а b + скаляр, то A^b является матрицей + A в степени b. + + + + + + + Примечания + + + + Для квадратных матриц A, A^p + вычисляется через последовательное перемножение матриц, если + p является положительным числом, а иначе - + через диагонализацию (см. примечания №2 и №3 ниже). + + + + + Если A квадратная и эрмитова матрица, а + p нецелый скаляр, то A^p + вычисляется как: + + + A^p = u*diag(diag(s).^p)*u' (для вещественной + матрицы A во внимание принимается только + вещественная часть ответа). + + + u и s определяются как + [u,s] = schur(A) . + + + + + Если A не является эрмитовой матрицей, + а p является нецелым скаляром, то + A^p вычисляется как: + + + A^p = v*diag(diag(d).^p)*inv(v) (для вещественной + матрицы A во внимание принимается только + вещественная часть ответа). + + + d и v определяются + как [d,v] = bdiag(A+0*%i). + + + + + Если A и p вещественные + или комплексные числа, то A^p является + главным значением, определяемым как + + + A^p = exp(p*log(A)) + + + (или A^p = exp(p*(log(abs(A))+ %i*atan(imag(A)/real(A)))) ). + + + + + Если A является квадратной матрице, а + p вещественным или комплексным числом, то + A.^p является главным значением + вычисленным как: + + + A.^p = exp(p*log(A)) (то же самое, что и в случае 4 выше). + + + + + операторы ** и ^ являются + синонимами. + + + + + + Возведение в степень в Scilab является оператором с ассоциативностью + справа, в отличие от Matlab® и Octave. + Например 2^3^4 в Scilab равно 2^(3^4), + а в Matlab® и Octave равно (2^3)^4. + + + + + Примеры @@ -98,8 +215,27 @@ s^(1:10) exp + expm + + крышечка + + inv + + + История + + + 6.0.0 + + С десятичным или комплексным числами scalar ^ squareMat + теперь даёт expm(log(scalar)*squareMat) вместо + scalar .^ squareMat. + + + + -- 1.7.9.5