Syntax
l=isintegerbv(x)
Input Parameter
x : | | scalar, array or vector |
Output Parameter
l : | | logical value,array or vector |
Examples
isintegerTL([pi pi pi;2 4 5;1.4 3 2.4])
Copyright 2017-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, isintegerbv
, determines whether elements in an input are integers by value, not by type. It was developed by Tim Lueth and is part of the SolidGeometry library.
Input Parameters
- x: This can be a scalar, array, or vector. It represents the input data for which the function will check if each element is an integer by value.
Output Results
- l: This is a logical value, array, or vector. It indicates whether each corresponding element in
x
is an integer by value. The output is true
if the element is an integer, and false
otherwise.
Algorithm Explanation
The function uses the modulus operation to determine if a number is an integer by value. Specifically, it checks if the remainder of the division of each element in x
by 1 is zero. If mod(x,1) == 0
, the element is considered an integer by value.
Example
Consider the example call: isintegerTL([pi pi pi;2 4 5;1.4 3 2.4])
. This will return a logical array indicating which elements are integers by value. In this case, only the elements 2, 4, and 5 will return true
.
Algorithm explaination created using ChatGPT on 2025-08-18 22:10. (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