Math
bounds_and_points_to_step(xmin, xmax, Nx)
Calculates the dx from the minmax Eq: Lx = abs(xmax - xmin) dx = Lx / (Nx - 1)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
xmin |
Array | float
|
the input start point |
required |
xmax |
Array | float
|
the input end point |
required |
Nx |
int | float
|
the number of points |
required |
Returns:
Name | Type | Description |
---|---|---|
dx |
Array | float
|
the distance between each of the steps. |
Source code in rs_tools/_src/utils/math.py
bounds_and_step_to_points(xmin, xmax, dx)
Calculates the number of points from the endpoints and the stepsize
Eq
Nx = 1 + floor((xmax-xmin)) / dx)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
xmin |
Array | float
|
the input start point |
required |
xmax |
Array | float
|
the input end point |
required |
dx |
Array | float
|
stepsize between each point. |
required |
Returns:
Name | Type | Description |
---|---|---|
Nx |
Array | int
|
the number of points |