refine (List, Maxinterval)

refine (List, Maxinterval) → List of number

When given a list of numbers, this function arranges and creates a new list where the difference between any two consecutive values is not greater than a specified maximum range (Maxinterval). The function adds new elements to the list to ensure that the required maximum range between consecutive values is met.

Example:

<br><O N="refineObject1" T="Project" Category="Functions" TransAlignRule="1"><br> <!-- created by ParamML Examples on 8/23/2023 --><br> <P N="List1" V="[0,25,40]" /><br> <P N="List2" V="refine(List1,5)" /><br> <P N="List3" V="[0.2,2,1]" /><br> <P N="List4" V="refine(List3,0.3)" /><br></O><br>

Last updated