isPL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 3.0, Creation date: 2016-06-21, Last change: 2025-09-14

PL has no NaN separator, 1st and last point are different

Description

returns true if PL argument is a point list, i.e. the list does not contain NaN separator row, and 1st and last point in the list are different.

See Also: isSG

Example Illustration

 missing image of isPL(PL)

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

Output Results

Algorithm Steps

  1. The function checks if the first and last points in the list are identical using isequal(PL(1,:), PL(end,:)).
  2. It also checks if there are any NaN values in the list using sum(sum(isnan(PL))) > 0.
  3. If either condition is true (the first and last points are the same or there are NaN values), the function sets b to false.
  4. 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:

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