Difference between revisions of "Normalize"

m
Line 1: Line 1:
 
[[Category:Transforming functions]]
 
[[Category:Transforming functions]]
 
[[Category:Doc Status C]] <!-- For Lumina use, do not change -->
 
[[Category:Doc Status C]] <!-- For Lumina use, do not change -->
 +
 +
= Normalize(y,x,i) =
 
   
 
   
Returns a scaled version of array R such that the area across index I is 1.
+
Rescales the values in «y» so that the area under the curve described by the points (x,y') is equal to 1, where y' is the result.  When either «y» or «x» is an index, you can omit «i», and use just [[Normalize]](y,x).
  
 
::''Should the function [[Normalize]] be deprecated and eventually removed from Analytica?  See the discussion tab and please weigh in with your opinions!''
 
::''Should the function [[Normalize]] be deprecated and eventually removed from Analytica?  See the discussion tab and please weigh in with your opinions!''
 
= Declaration =
 
 
Normalize( R : Numeric[I] ; I : Index )
 
or
 
Normalize(R1,R2,I)
 
  
 
= Notes =
 
= Notes =
  
 
''Normalize'' does '''not''' force the values along index I to sum to 1; to make the values sum to 1, use  
 
''Normalize'' does '''not''' force the values along index I to sum to 1; to make the values sum to 1, use  
  R/[[Sum]](R,I).
+
  y/[[Sum]](y,I).
  
 
''Normalize'' does '''not''' cause the length of the resulting vector to be 1.  To normalize in that sense, use:
 
''Normalize'' does '''not''' cause the length of the resulting vector to be 1.  To normalize in that sense, use:
  R / [[Sqrt]]([[Sum]](R^2,I))
+
  y / [[Sqrt]]([[Sum]](y^2,I))
  
 
= See Also =
 
= See Also =

Revision as of 04:26, 13 September 2009


Normalize(y,x,i)

Rescales the values in «y» so that the area under the curve described by the points (x,y') is equal to 1, where y' is the result. When either «y» or «x» is an index, you can omit «i», and use just Normalize(y,x).

Should the function Normalize be deprecated and eventually removed from Analytica? See the discussion tab and please weigh in with your opinions!

Notes

Normalize does not force the values along index I to sum to 1; to make the values sum to 1, use

y/Sum(y,I).

Normalize does not cause the length of the resulting vector to be 1. To normalize in that sense, use:

y / Sqrt(Sum(y^2,I))

See Also

Comments


You are not allowed to post comments.