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
- AF: A symbolic equation. This is the main input from which the function extracts parameter names.
- L: An optional letter for individualizing the equation. If provided, it is used as a prefix for the parameters.
Output Results
- vpar: A string of variable names separated by commas, potentially prefixed by the letter
L
.
- vsyms: A string of symbol definitions separated by spaces, also potentially prefixed by the letter
L
.
Algorithm Steps
- Initialize
L
as an empty array. If a second argument is provided, assign it to L
.
- If
L
is not empty, format it to include an underscore (e.g., 'A_'
).
- Extract the argument names from the symbolic function
AF
using argnames(AF)
.
- Determine the number of arguments
k
.
- Convert the argument names to a character array
vpar
. If there is more than one argument, adjust the string to remove unwanted characters.
- Create
vsyms
by replacing commas in vpar
with spaces.
- Format
vpar
by prefixing each parameter with L
and separating them with spaces.
- 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