xwindow dialog for Xcos
[ok,x1,..,x14]=scicos_getvalue(desc,labels,typ,ini)
:desc column vector of strings, dialog general comment : :labels n column vector of strings, labels(i) is the label of the
ith required value
:typ_i defines the type of the ith value, may have the following values:
:”mat” for constant matrix : :”col” for constant column vector : :”row” for constant row vector : :”vec” for constant vector : :”intvec” for constant vector with integer values i.e int(x) == x : :”str” for string : :”lis” for list :
:
: :ok boolean ,%t if ok button pressed, %f if cancel button pressed : :xi contains the ith value if ok=%t. If left hand side has one more
xi than required values the last xi contains the vector of answered strings.
:
This function encapsulate x_mdialog function with error checking, evaluation of numerical response, ...
All valid expressions can be used as answers; for matrices and vectors getvalues automatically adds [ ] around the given answer before numeric evaluation.
labels=["magnitude";"frequency";"phase "];
[ok,mag,`freq`_,ph]=scicos_getvalue("define sine signal",labels,...
`list`_("vec",1,"vec",1,"vec",1),["0.85";"10^2";"%pi/3"])