Difference between revisions of "Uncumulate"

m
Line 2: Line 2:
 
[[Category:Array functions]]
 
[[Category:Array functions]]
 
[[Category:Doc Status D]] <!-- For Lumina use, do not change -->
 
[[Category:Doc Status D]] <!-- For Lumina use, do not change -->
 +
 
==Uncumulate(x, i, firstElement)==
 
==Uncumulate(x, i, firstElement)==
  
Finds the difference between each element of x and its predecessor along i.
+
Finds the difference between each element of «x» and its predecessor along «i».
  
Uncumulate(x, i) returns an array whose first element (along i) is the first element of x, and each other element is the difference between the corresponding element of x and the previous element of x.  
+
[[Uncumulate]](x, i) returns an array whose first element (along «i») is the first element of «x», and each other element is the difference between the corresponding element of «x» and the previous element of «x».  
  
Uncumulate(x, i, firstElement) returns an array with the first element along i equal to firstElement, and each other element equal to the difference between the corresponding element of x and the previous element of x.
+
[[Uncumulate]](x, i, firstElement) returns an array with the first element along «i» equal to «firstElement», and each other element equal to the difference between the corresponding element of «x» and the previous element of «x».
  
Uncumulate(x, i) is the inverse of Cumulate(x, i). Uncumulate(x, i, 0) is similar to a discrete differential operator.
+
[[Uncumulate]](x, i) is the inverse of [[Cumulate]](x, i). [[Uncumulate]](x, i, 0) is similar to a discrete differential operator.
  
 
==Examples==
 
==Examples==
 
 
The following example returns a table that shows an increase in the cost ownership of certain car types over a certain period of time.
 
The following example returns a table that shows an increase in the cost ownership of certain car types over a certain period of time.
  
<code>Uncumulate (Cost_of_ownership, Time)</code>
+
:<code>Uncumulate (Cost_of_ownership, Time) &rarr;</code>
{| border="1"  
+
:{| class="wikitable"
! !! colspan="5" style="text-align: left;" | Time &#9654;
+
! !! colspan="5" | Time &#9654;
 
|-
 
|-
 
! style="width:100px;" |'''Car_type &#9660; '''
 
! style="width:100px;" |'''Car_type &#9660; '''
Line 51: Line 51:
 
The next example returns a table that shows the increase in the cost of ownership of cars compared to the previous time period and also sets the first value to 0.
 
The next example returns a table that shows the increase in the cost of ownership of cars compared to the previous time period and also sets the first value to 0.
  
<code>Uncumulate (Cost_of_ownership, Time, 0)</code>
+
:<code>Uncumulate (Cost_of_ownership, Time, 0) &rarr;</code>
{| border="1"   
+
:{| class="wikitable"   
! !! style="text-align: left;" colspan="5" | Time &#9654;
+
! !! colspan="5" | Time &#9654;
 
|-
 
|-
 
! style="width:100px;" |'''Car_type &#9660; '''
 
! style="width:100px;" |'''Car_type &#9660; '''
Line 85: Line 85:
  
 
==See Also==
 
==See Also==
 
 
* [[Cumulate]]
 
* [[Cumulate]]
 
* [[Array_Function_Example_Variables|Example variables]]
 
* [[Array_Function_Example_Variables|Example variables]]
 
* [http://wiki.analytica.com/User_Guide_Examples User Guide Examples] / [http://wiki.analytica.com/Media:_Array_Function_Examples.ana  Array Function Examples.ana] / Reducing Functions Module
 
* [http://wiki.analytica.com/User_Guide_Examples User Guide Examples] / [http://wiki.analytica.com/Media:_Array_Function_Examples.ana  Array Function Examples.ana] / Reducing Functions Module
 
__FORCETOC__
 
__FORCETOC__

Revision as of 00:03, 16 January 2016


Uncumulate(x, i, firstElement)

Finds the difference between each element of «x» and its predecessor along «i».

Uncumulate(x, i) returns an array whose first element (along «i») is the first element of «x», and each other element is the difference between the corresponding element of «x» and the previous element of «x».

Uncumulate(x, i, firstElement) returns an array with the first element along «i» equal to «firstElement», and each other element equal to the difference between the corresponding element of «x» and the previous element of «x».

Uncumulate(x, i) is the inverse of Cumulate(x, i). Uncumulate(x, i, 0) is similar to a discrete differential operator.

Examples

The following example returns a table that shows an increase in the cost ownership of certain car types over a certain period of time.

Uncumulate (Cost_of_ownership, Time) →
Time ▶
Car_type ▼ 0 1 2 3 4
VW 2810 141 147 155 163
Honda 3535 312 50 269 199
BMW 3185 109 115 120 127

The next example returns a table that shows the increase in the cost of ownership of cars compared to the previous time period and also sets the first value to 0.

Uncumulate (Cost_of_ownership, Time, 0) →
Time ▶
Car_type ▼ 0 1 2 3 4
VW 0 141 147 155 163
Honda 0 312 50 269 199
BMW 0 109 115 120 127

See Also

Comments


You are not allowed to post comments.