Please note that the recommended version of Scilab is 2023.1.0. This page might be outdated.
See the recommended documentation of this function
(/) right divisions. System's feed back. Comments
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 */
X=A/B is the solution of
The slash (right division) and backslash (left division) operators are linked by the following equation:
In the case where
A is square, the
X can be computed either from LU
factorization or from a linear least squares solver. If the
condition number of
A is smaller than
1/(10*%eps) (i.e. if
well conditioned), the LU factorization with row pivoting is
used. If not (i.e. if
A is poorly
X is the minimum-norm
solution which minimizes
a complete orthogonal factorization of
X is the solution of a linear least
A./B is the element-wise right division, i.e.
the matrix with entries
B is scalar (1x1 matrix) this
operation is the same as
A is a scalar.
System feed back.
S = G/.K evaluates
S = G*(eye() + K*G)^(-1) this operator avoid
// comments a line i.e. lines which begin by
// are ignored by the interpreter.
It is the same with
/* which start to comment a block of code
*/ which end to comment this block.
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 */
- inv — matrix inverse
- backslash — (\) left matrix division.
- kron ./. — Kronecker left and right divisions
- comments — (// or /*...*/) comments
- overloading — display, functions and operators overloading capabilities
|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 keywords||star >>|