thisfuncname

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

just returns the name of the calling fnct

Description

very similar to titleofcaller

See Also: titleofcaller

Example Illustration

 missing image of thisfuncname

Syntax

[t,td]=thisfuncname

Output Parameter

t: name of calling function
td:

Examples


thisfuncname




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 function, thisfuncname, is designed to return the name of the calling function and a timestamp. It is part of the SolidGeometry library and was introduced in version 4.7.

Input Parameters

The function does not take any input parameters.

Output Results

Algorithm Steps

  1. Initialize a variable n to 0. This variable is used to determine the stack level to inspect.
  2. Use the dbstack function to get the call stack information and store it in the variable caller.
  3. Check if the size of caller is greater than n and n is non-negative.
  4. If the condition is true, set fname to the name of the function at the stack level end-n.
  5. If the condition is false, extract the version of MATLAB using version and strtok, and set fname to a string indicating the MATLAB version.
  6. Replace underscores in fname with hyphens (though this line is commented out in the code).
  7. Format the output t using sprintf to include the function name.
  8. Format the output td using sprintf to include the function name and the current date and time using datestr(clock).
Algorithm explaination created using ChatGPT on 2025-08-18 22:45. (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