Syntax
b=isPL(PL)
Input Parameter
PL : | | Point List, (nx2) or (nxm) |
Output Parameter
b : | | true if PL has no NaN separator, 1st and last point are different |
Examples
Compare the result of:
isPL(rand(10,2))
isPL(CPLofPL(rand(10,2)))
Copyright 2016-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, isPL
, is designed to determine if a given point list (PL) meets specific criteria. It checks if the list does not contain a NaN separator and if the first and last points in the list are different.
Input Parameters
- PL: A point list, which can be in the form of an
nx2
or nxm
matrix, where n
is the number of points and m
is the number of dimensions.
Output Results
- b: A boolean value. It returns
true
if the point list does not contain any NaN values and the first and last points are different. Otherwise, it returns false
.
Algorithm Steps
- The function checks if the first and last points in the list are identical using
isequal(PL(1,:), PL(end,:))
.
- It also checks if there are any NaN values in the list using
sum(sum(isnan(PL))) > 0
.
- If either condition is true (the first and last points are the same or there are NaN values), the function sets
b
to false
.
- If neither condition is true, the function sets
b
to true
.
Example Usage
To see how the function works, you can compare the results of the following calls:
isPL(rand(10,2))
: This generates a random 10x2 matrix and checks if it meets the criteria.
isPL(CPLofPL(rand(10,2)))
: This uses another function, CPLofPL
, to process the random matrix before checking it.
Algorithm explaination created using ChatGPT on 2025-08-18 22:33. (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