Syntax
wins=angleinterv(wins,[ival]);
Input Parameter
wins : | | List of angle delta values [wmin wmax] |
ival : | | [-pi..+pi] or [0 2*pi] |
Output Parameter
wins : | | Values of wins(:,1) in the allowed ival; no delta > 2*pi |
Examples
AL=rand(10,2)*3*pi, angleinterv(AL)
Copyright 2021-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 algorithm is designed to shift angle intervals into a specified range, either [-pi, +pi] or [0, 2*pi]. It processes a list of angle delta values and ensures that the second value in each interval is within a specific range relative to the first value.
Input Parameters
- wins: A list of angle delta values, represented as pairs [wmin, wmax].
- ival: The target interval for the angles, which can be either [-pi, +pi] or [0, 2*pi]. This is an optional parameter, and if not provided, defaults to [0, 2*pi].
Output Results
- wins: The adjusted list of angle intervals, where each starting value is within the specified interval, and no delta exceeds 2*pi.
Algorithm Steps
- Initialize the original list of angle intervals,
worg
, with the input wins
.
- Determine the target interval
ival
using the function getfuncparams
. If ival
is not provided, it defaults to [0, 2*pi].
- Iterate over each row in
wins
:
- Shift the starting angle
wins(i,1)
into the specified interval ival
using the angleshift
function.
- Shift the ending angle
wins(i,2)
into the range starting from the adjusted wins(i,1)
to wins(i,1) + 2*pi
.
- If no output is requested (
nargout == 0
), print a debug message indicating the shift of all angle values into the 2*pi interval.
- Display the original and new angle intervals in a table format using
array2tableTL
.
- Plot the adjusted angle intervals using the
cplot
function.
Algorithm explaination created using ChatGPT on 2025-08-19 08:06. (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