uniqueNaN

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

finds copies of lists such as CPL with in a nan separted list



See Also: selectNaN , lengthNaN , replaceNaN , cellofNaN , separateNaN , unsortNaN

Example Illustration

 missing image of uniqueNaN(CPL)

Syntax

[CPLU,ai]=uniqueNaN(CPL)

Input Parameter

CPL: Original NaN sperated list

Output Parameter

CPLU: Reduced Nan separted list with unique entries
ai: indes list for

Examples


CPL=[CPLsample(13);nan nan;CPLsample(13)]
[a,b]=uniqueNaN(CPL)




Copyright 2019-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 process a list separated by NaN values, identifying unique sublists within it. The function uniqueNaN takes a NaN-separated list as input and returns a reduced list with unique entries, along with an index list.

Input Parameters

Output Results

Algorithm Steps

  1. Determine the number of sublists in CPL using the function separateNaN, which counts the segments separated by NaN.
  2. Initialize the list ul with the first sublist index and ai with NaN values, setting the first index to 1.
  3. Iterate over each sublist in CPL starting from the second one:
  4. After processing all sublists, use selectNaN to extract the unique sublists from CPL based on the indices in ul.

The function effectively reduces the input list to its unique components, providing a streamlined version of the data for further analysis or processing.

Algorithm explaination created using ChatGPT on 2025-08-18 23:58. (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