tk_dialog           Jan 2001           Ying-Wan Lam           tkgui Function
NAME
tk_dialog - an interface allow editing matrices and lists using the tk widgets
CALLING SEQUENCE
result=tk_dialog(default_inputs)
result=tk_dialog(labels,default_inputs)
result=tk_dialog(title,labels,default_inputs)
result=tk_dialog(title,labelsv,labelsh,default_inputs)
PARAMETERS
-
title
: column vector of strings, comment or title for the dialog. Lines of multiple-lines title should be separated by \n or \r.
-
default_input
: n vector, matrix or list, default_inputs contain the initial values of the input items.
-
labels
: n column vector of strings, labels(i) is the label of the ith required value.
-
labelsv
: n vector of strings, labelsv(i) is the label of the ith row of the dialog.
-
labelsh
: m vector of strings, in case of a matrix, labelsh(j) is the label of the jth column. Otherwise, it is not used.
-
result
: an item of the same type and dimension of default_inputs. When default_inputs is a vector or matrix, result will be a matrix of the same size and data type if "Ok" button is pressed or [] if "Cancel" button is pressed.When default_inputs is a list or typed-list, result will be a similar list if "Ok" is pressed or an empty list if "Cancel" is pressed.
DESCRIPTION
A tksci interface for editing or inputing matrix and list. Type tk_dialog() to see examples.
EXAMPLES
txt=['magnitude';'frequency';'phase '];
sig=tk_dialog('enter sine signal',txt,[1;10;0])
mag=sig(1)
frq=sig(2)
ph=sig(3)
n=5;m=4;mat=rand(n,m);
row='row';labelv=row(ones(1,n))+string(1:n)
col='col';labelh=col(ones(1,m))+string(1:m)
new=tk_dialog('Matrix to edit',labelv,labelh,mat)
l=list('Item 1',3,%t)
l=tk_dialog(l)
SEE ALSO
x_dialog, x_mdialog, x_matrix