getfuncparams

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CODING/DEVELOP
Introduced first in SolidGeometry 4.3, Creation date: 2018-10-11, Last change: 2025-09-14

processes varargin list -

Description

SG-Lib standard function to process the input arguments varargin
This function is automaticaly processed/parsed by Tim Lueth's FM documentation database
===> if nargin>=XX && ~isempty(varargin{XX}); YYY=varargin{XX}; end;
The function is able to handle arrays of input vales per argument


See Also: getvarg

Example Illustration

 missing image of getfuncparams(n,args,v,fillinm,b,b,b)

Syntax

[nv,ea]=getfuncparams(n,args,v,[fillinm,b,b,b])

Input Parameter

n: number of parameter varargin
args: varargin
v: default value
fillinm: default is false; if true, variable is filled with default values
b:
b:
b:

Output Parameter

nv: value for variable or logical of found if there are two output arguments
ea: true if argument was empty

Examples


m=getfuncparams(1,varargin,1);
getfuncparams(1,{'a','b','c'},3)
getfuncparams(4,{'a','b','c'},3)
[a,b]=getfuncparams(2,{'a','','c'},3) % b shows that there 2nd is empty
[a,b]=getfuncparams(6,{'a','','c'},3) % b shows that 6th is empty
[a,b]=getfuncparams(3,{'a','','c'},'c') % b shows that 3rd is forced / given
getfuncparams(1,{9},[1 2 3 4]) % replaces the array by a scalar
getfuncparams(1,{9},[1 2 3 4],true) % replaces the first element of the array
getfuncparams(1,{[9 8 7]},[1 2 3 4],true) % replaces the first three elements of the array
A=SGbox, B=SGbox, C=[A B], getfuncparams(1,{A,B,C},[C B A],true)




Copyright 2018-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

Last html export of this page out of FM database by TL: 2025-09-21