ispath
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 3.2, Creation date: 2016-12-26, Last change: 2025-09-14
returns wether a string is part of the file path
See Also:
Example Illustration
Syntax
l=ispath(npath)
Input Parameter
Output Parameter
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, ispath, determines whether a specified string, npath, is part of the current MATLAB file path.
Input Parameters
- npath: A string representing the name of the path to be checked.
Output Results
- l: A boolean value,
true if npath is part of the current file path, and false otherwise.
Algorithm Steps
- Retrieve the current MATLAB file path using the
path function and store it in variable a.
- Use
strfind to search for the occurrence of npath within a. The result is stored in p.
- Check if
p is not empty using isempty. If p is not empty, it means npath is part of the file path, and l is set to true. Otherwise, l is set to false.
Algorithm explaination created using ChatGPT on 2025-08-18 21:52. (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