Simple user-friendly GUI for the input of parameters
varargout = CL_inputParam(desc)
CL_inputParam in an interface to x_mdialog for an enhanced input of parameters. It should be used in conjunction with CL_defparam.
Enhancements include the management of units and the validation of the values (that may belong to a set of accepted values or that can be checked using some arbitrary scilab expressions). Any scilab expression is a valid value for CL_inputParam.
The number of output arguments is normally n, n being the number of parameter descriptions.
An additional argument may be passed. Returned values for this argument are: %t (the 'OK' button has been pressed), and %f (the 'Cancel' button has been pressed). If only n output parameters are present, an error is generated if the 'cancel' button has been pressed. This error may be caught by try...catch.
List of parameter structures. Use CL_defParam to initialize each structure.
Output variables (1 for each parameter structure + 1 optional 'OK' output variable). The parameter values in the varargout list are given in 'internal' units.
CNES - DCT/SB (AL)
desc=list(.. CL_defParam("param 1",val=1000,units=['m', 'km'],valid='$x > 0',dim=-1),.. CL_defParam("param 2",val=[1,2],units=['Z'],valid='$x < 10',dim=-1),.. CL_defParam("param 3",val=[1,2,3,4,5,6,7,8],dim=-1,accv=1:10).. ); [v1, v2, v3] = CL_inputParam(desc) // error if "cancel" pressed [v1, v2, v3, OK] = CL_inputParam(desc) // no error if "cancel" pressed | ![]() | ![]() |