symfunparam

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Symbolics tools
Introduced first in SolidGeometry 1.1, Creation date: 2013-09-28, Last change: 2025-09-14

returns individualized string for symbolic parameters and definition

Description

This function can be used for automation equation generation by the eval command. It is possible to use an existing symbolic equation to call it with modified parametersets. Important for the calucation of the movement equations in kinematic chains.

Example Illustration

 missing image of symfunparam(AF,L)

Syntax

[vpar,vsyms]=symfunparam(AF,[L])

Input Parameter

AF: symbolic equation
L: Letter for individual equation

Output Parameter

vpar: variable string (parameter separated by comma)
vsyms: symbol definition string (parameter separated by space)

Examples

Exa
syms x y
F(x,y)=cos(x)*sin(x)+cos(y)
[par,sym]=symfunparam (F)
[par,sym]=symfunparam (F,'A')




Copyright 2013-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, symfunparam, is designed to generate strings for symbolic parameters and their definitions, which can be used for automating equation generation. It is particularly useful in the context of kinematic chains.

Input Parameters

Output Results

Algorithm Steps

  1. Initialize L as an empty array. If a second argument is provided, assign it to L.
  2. If L is not empty, format it to include an underscore (e.g., 'A_').
  3. Extract the argument names from the symbolic function AF using argnames(AF).
  4. Determine the number of arguments k.
  5. Convert the argument names to a character array vpar. If there is more than one argument, adjust the string to remove unwanted characters.
  6. Create vsyms by replacing commas in vpar with spaces.
  7. Format vpar by prefixing each parameter with L and separating them with spaces.
  8. Format vsyms similarly by prefixing each symbol with L and separating them with spaces.
Algorithm explaination created using ChatGPT on 2025-08-19 00: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