Syntax
ri=isrealr(VL)
Input Parameter
VL : | | vector list with rows and columns [n x m] |
Output Parameter
ri : | | index list; r(i)==true if all elements of VL(i,:) = real |
Examples
invkinrplan3(10,10,10,[10 10 10;14 14 10]); isrealr(ans)
invkinrplan3(10,10,10,[10 10 10;14 14 14]); isrealr(ans)
Copyright 2018-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 determine if all elements in each row of a given matrix are real numbers. It is a function named isrealr
and is part of the SolidGeometry library.
Input Parameters
- VL: A matrix with dimensions [n x m], where 'n' is the number of rows and 'm' is the number of columns. Each row is a vector whose elements are checked for being real numbers.
Output Results
- ri: A logical index list (vector) with 'n' elements. Each element
ri(i)
is true
if all elements in the i-th row of VL
are real numbers, otherwise false
.
Algorithm Steps
- Determine the number of rows in the input matrix
VL
using the size
function and store it in nv
.
- Initialize a logical vector
ri
of size nv
with all elements set to false
.
- Iterate over each row of the matrix
VL
using a for
loop that runs from 1 to nv
.
- For each row
i
, use the isreal
function to check if all elements in the row are real numbers.
- If all elements in the row are real, set
ri(i)
to true
.
- Return the logical vector
ri
as the output.
Example Usage
The function can be used in conjunction with other functions, such as invkinrplan3
, to check the reality of the results. For example:
invkinrplan3(10,10,10,[10 10 10;14 14 10]); isrealr(ans)
invkinrplan3(10,10,10,[10 10 10;14 14 14]); isrealr(ans)
In these examples, the function checks if the results from invkinrplan3
are real for each row of the output.
Algorithm explaination created using ChatGPT on 2025-08-18 22:43. (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