Syntax
tck=ticksofminmax(bb,[res,det])
Input Parameter
bb : | | [min max] |
res : | | distance between ticks |
det : | | resolution default is .1 |
Output Parameter
tck : | | unique increasing values between bb(1) and bb(2) |
Examples
ticksofminmax([-pi +pi],1,.01)
Copyright 2020-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, ticksofminmax
, generates a list of unique, increasing values between two specified bounds, bb(1)
and bb(2)
. It is part of the SolidGeometry library and was introduced in version 5.0.
Input Parameters
- bb: A two-element vector specifying the minimum and maximum bounds,
[min max]
.
- res: The distance between ticks. This is an optional parameter and defaults to 5 if not provided.
- det: The resolution for rounding. This is an optional parameter and defaults to 0.1 if not provided.
Output
- tck: A vector of unique, increasing values between
bb(1)
and bb(2)
.
Algorithm Steps
- Retrieve the
res
parameter using getfuncparams
, defaulting to 5 if not specified.
- Retrieve the
det
parameter using getfuncparams
, defaulting to 0.1 if not specified.
- Generate a range of values from
rounddiv(bb(1), res)
to rounddiv(bb(2), res)
with a step size of res
.
- Include the rounded values of
bb(1)
and bb(2)
using det
for rounding.
- Combine all values into a single vector.
- Sort the vector and remove duplicates using
sort(unique(tck))
.
Example
To generate ticks between -pi
and +pi
with a resolution of 1 and a detail of 0.01, use:
ticksofminmax([-pi +pi], 1, .01)
Algorithm explaination created using ChatGPT on 2025-08-18 22:55. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21