Syntax
fn=smbPSLibname([FName])
Input Parameter
FName : | | smb_function name; default is |
Output Parameter
fn : | | smb_function file name;default is directory name |
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, smbPSLibname
, is designed to return the name of a SimMultiBody Library Directory or a specific file path within that directory. It is part of the SimMechanics library and was created by Tim Lueth.
Input Parameters
- FName: This is an optional input parameter. It represents the name of a function within the SimMultiBody library. If not provided, the function defaults to returning the library path.
Output
- fn: This is the output of the function. It returns the file name path if
FName
is provided, or the directory name if FName
is not provided.
Algorithm Steps
- Initialize
FName
as an empty string.
- Check if there is at least one input argument and if the first argument is not empty. If so, assign the first argument to
FName
.
- Construct the file path using the
smbFilename
function and the FName
variable. The path is formatted as '%s+mechPS_Tim_Lueth/%s'
, where the first placeholder is replaced by the result of smbFilename
and the second by FName
.
- If the operating system is Windows (checked using
ispc
), replace forward slashes with backslashes in the file path using strrep
.
The function is part of a larger library and interacts with other functions such as smbNewSystem
, smbWhich
, smbFilename
, and smbPSLibCompile
.
Algorithm explaination created using ChatGPT on 2025-08-18 23:30. (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