isintegerbv

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 4.0, Creation date: 2017-07-20, Last change: 2025-09-14

returns whether a number is an integer by value not by type

Description

mod(x,1)==0



See Also: , int32orfloat

Example Illustration

 missing image of isintegerbv(x)

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

Output Results

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