File: backslash.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (33 lines) | stat: -rw-r--r-- 1,320 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
backslash          Scilab Group          Scilab Function          backslash
NAME
   backslash (\) - left matrix division.
  
CALLING SEQUENCE
 x=A\b
DESCRIPTION
   Backslash denotes left matrix division.  x=A\b is a solution to A*x=b.
  
   If A is nonsingular x=A\b (uniquely defined)  is equivalent to
  x=inv(A)*b.
  
   If A is singular, x is a least square solution. i.e. norm(A*x-b) is
  minimal. If A is full column rank, the least square solution, x=A\b, is
  uniquely  defined (there is a unique x which minimizes norm(A*x-b)). If A
  is not full column rank, then the least square solution is not unique,
  and x=A\b, in general, is not the solution with minimum norm (the minimum
  norm solution is x=pinv(A)*b). 
  
   A.\B  is the matrix with (i,j) entry A(i,j)\B(i,j). If A (or B) is a
  scalar A.\B is equivalent to  A*ones(B).\B (or A.\(B*ones(A)) 
  
   A\.B  is an operator with no predefined meaning. It may be used to define
  a new operator (see overloading) with  the same precedence as * or /.
  
EXAMPLE
 A=rand(3,2);b=[1;1;1]; x=A\b; y=pinv(A)*b;  x-y
 A=rand(2,3);b=[1;1]; x=A\b; y=pinv(A)*b; x-y, A*x-b, A*y-b
 A=rand(3,1)*rand(1,2); b=[1;1;1]; x=A\b; y=pinv(A)*b; A*x-b, A*y-b
 A=rand(2,1)*rand(1,3); b=[1;1]; x=A\b; y=pinv(A)*b; A*x-b, A*y-b 
SEE ALSO
   slash, inv, pinv, percent, ieee