Syntax
ppp=showpath([nn])
Input Parameter
Output Parameter
ppp : | | [n x 1] cell array of all path or the selected entries |
Examples
showpath % [n x 1] cell array of all path
showpath(1:3) % returns only the first 3 entries
Copyright 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, showpath
, is designed to return the current search path in MATLAB as an n x 1 cell array. It is part of the SolidGeometry library and was introduced in version 5.5.
Input Parameters
- nn: An optional input parameter that specifies the indices of the path entries to be returned. It is a cell array index.
Output Results
- ppp: An n x 1 cell array containing all path entries or only the selected entries if
nn
is specified.
Algorithm Steps
- The function begins by calling
getfuncparams
to retrieve the input parameter nn
. If no parameter is provided, nn
defaults to an empty array.
- The current MATLAB search path is split into individual path entries using the
split
function with ':' as the delimiter. This results in a cell array ppp
containing all path entries.
- If
nn
is not empty, the function filters ppp
to include only the entries specified by the indices in nn
.
- The function returns the resulting cell array
ppp
.
Example Usage
showpath
: Returns an n x 1 cell array of all path entries.
showpath(1:3)
: Returns only the first three entries of the path.
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