Difference between revisions of "Normalize"

m (adding doc status category)
Line 3: Line 3:
 
   
 
   
 
Returns a scaled version of array R such that the area across index I is 1.
 
Returns a scaled version of array R such that the area across index I is 1.
 +
 +
::''Should the function [[Normalize]] be deprecated and eventually removed from Analytica?  See the discussion tab and please weigh in with your opinions!''
  
 
= Declaration =
 
= Declaration =
Line 14: Line 16:
 
''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).
 
  R/[[Sum]](R,I).
 +
 +
''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))

Revision as of 02:20, 13 September 2009


Returns a scaled version of array R such that the area across index I is 1.

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

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).

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))
Comments


You are not allowed to post comments.