~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to man/elementary/norm.cat

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
norm             Scilab Group             Scilab Function              norm
 
2
NAME
 
3
   norm - matrix norms
 
4
  
 
5
CALLING SEQUENCE
 
6
 [y]=norm(x [,flag])
 
7
PARAMETERS
 
8
 x          : real or complex vector or matrix (full or sparse storage)
 
9
            
 
10
 flag       : string (type of norm) (default value =2)
 
11
            
 
12
DESCRIPTION
 
13
   For matrices
 
14
  
 
15
 norm(x)         : or norm(x,2) is the largest singular value of x
 
16
                 (max(svd(x))). 
 
17
                 
 
18
 norm(x,1)       : The l_1 norm x (the largest column sum : 
 
19
                 maxi(sum(abs(x),'r'))  ).
 
20
                 
 
21
 norm(x,'inf'),norm(x,%inf)
 
22
                  : The infinity norm of x (the largest row sum :  maxi(sum(abs(x),'c')) 
 
23
                 ).
 
24
                 
 
25
 norm(x,'fro')   : Frobenius norm i.e. sqrt(sum(diag(x'*x)))
 
26
                 
 
27
   For vectors
 
28
  
 
29
 norm(v,p)       : l_p norm (sum(v(i)^p))^(1/p) .
 
30
                 
 
31
 norm(v)         : =norm(v,2) : l_2 norm
 
32
                 
 
33
 norm(v,'inf')   : max(abs(v(i))).
 
34
                 
 
35
EXAMPLE
 
36
 A=[1,2,3];
 
37
 norm(A,1)
 
38
 norm(A,'inf')
 
39
 A=[1,2;3,4]
 
40
 max(svd(A))-norm(A)
 
41
 
 
42
 A=sparse([1 0 0 33 -1])
 
43
 norm(A)
 
44
 
 
45
SEE ALSO
 
46
   h_norm, dhnorm, h2norm, abs 
 
47