Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get the minimum and maximum of a list rounded to a multiple
ResourceFunction["MinMaxRounded"][list] gives the minimum and maximum of list, rounded down and up, respectively. | |
ResourceFunction["MinMaxRounded"][list,a] gives the minimum and maximum of list, rounded down and up to a multiple of a. | |
Find the rounded-down minimum and rounded-up maximum for a list of values:
In[1]:= |
Out[1]= |
Find the minimum rounded down to a multiple of 5 and the maximum rounded up to a multiple of 5 for a list of values:
In[2]:= |
Out[2]= |
By default, the minimum is rounded down and the maximum rounded up:
In[3]:= |
Out[3]= |
Round the minimum up and the maximum down:
In[4]:= |
Out[4]= |
Round the minimum and the maximum to the closest multiple of 5:
In[5]:= |
Out[5]= |
If the minimum is positive, return 0 and do not round the maximum:
In[6]:= |
Out[6]= |
Find a "nice" plot range that includes all the data:
In[7]:= |
Out[8]= |
An empty list returns :
In[9]:= |
Out[9]= |
This work is licensed under a Creative Commons Attribution 4.0 International License