The function calculates the average of the elements in a specified one-dimensional list. It adds up all the values in the list and divides the sum by the number of elements to find the arithmetic mean.
Example:
<O N="avgObject1" T="Project" Category="Functions" TransAlignRule="1"> <!-- created by ParamML Examples on 13.02.2023 --> <P N="a" V="avg([5])" /> <P N="b" V="avg([5,5,5,5])" /> <P N="c" V="avg([5,0,10,4,6])" /> <P N="d" V="avg([3,6,7,4,-6,11,10])" /> <P N="e" V="avg([13,16,17,14,4,21,20])" /> </O> |
The result is a=b=c=d=5' and e=15. |
To view this example in the library, see (https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&folder=Functions&obj=objidm4y33fov8mi0o7kzn2fikvg) |
Example:
<O N="avgObject2" T="Project" Category="Functions" TransAlignRule="1"> <!-- created by ParamML Examples on 13.02.2023 --> <P N="A" V="avg([1,2,3,4,5])" /> <P N="B" V="avg([5,5,4,6])" /> <P N="C" V="avg([80,70,90,-90])" /> <P N="D" V="avg([3,6,7,4,64,11,10])" /> <P N="E" V="avg([0,2,4,6])" /> </O> |
To view this example in the library, see (https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&folder=Functions&obj=objidvsr47ihh7mhyn1oyu656bp) |
Add Comment