Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - Português

Change language to:
English - Français - 日本語 - Русский

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

Ajuda do Scilab >> Scilab > Scilab palavra-chave > slash

slash

(/) divisão esquerda-direita e feedback ("resposta")

Syntax

X = A / B // while A = X * B
X = A ./ B // while A = X .* B
X = A ./. B // while A = X .*. B
S = G /. K
// on-row comment
/* block of multilines comments */

Descrição

Divisão esquerda-direita. x=A / b é a solução de x*b=A .

b/a = (a' \ b')' .

a./ b é a matriz com entradas a(i,j)/ b(i,j) .Se b é escalar (matriz 1x1) esta operação é o mesmo que a./b*ones(a). (mesma convenção se a é um escalar).

(\) significa divisão direita-esquerda.

Feedback de sistema.S=G/.K avalia S=G*(eye()+K*G)^(-1) . Este operador evita o problema de simplificação.

Observe que 123./b é interpretado como (123)./b. Nestes casos, o ponto é parte do operador, não do número.

In the opposite, G/.5 é interpretado como G/(.5). Em tais casos, o ponto é parte do número, não do operador, while it is not the case in G/. 5

Comentário. // comenta uma linha, i.e. linhas que começam por // são ignoradas pelo interpretador.

It is the same with /* which start to comment a block of code and with */ which end to comment this block.

Examples

a = [3.,-24.,30.];
B = [
   9.   -36.    30.
  -36.   192.  -180.
   30.  -180.   180.
];
x = a / B
x*B-a // close to zero

a = 4 / 2;        // Should be 2
a = 2 ./ [2,4];   //  [1. 0.5]

Kronecker right division :

A = [1 100 ; 10 1000], B = [1 2 4],
P = A .*. B
P ./. B
--> A = [1 100 ; 10 1000], B = [1 2 4],
 A  =
   1.    100.
   10.   1000.

 B  =
   1.   2.   4.

--> P = A .*. B
 P  =
   1.    2.    4.    100.    200.    400.
   10.   20.   40.   1000.   2000.   4000.

--> P ./. B
 ans  =
   1.   100.
   10.  1000.

// Comments are good. They help to understand code
a = 1;  // Comment after some heading instructions
/* Even long, that is to say on many lines,
comments are useful */

Histórico

VersionDescription
5.4.1 The threshold level which switches between Gaussian Elimination with row pivoting and linear least squares when computing B/A is decreased from sqrt(eps) to eps.
6.0.0 1./B means now 1 ./ B, no longer 1. / B
Report an issue
<< semicolon (;) Scilab palavra-chave star >>

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:
Tue Feb 25 08:52:27 CET 2020