I want a dialogue box which asks users to choose the Inputs(Variables of a function) they want to give and then enter their values as input.
As an example,
Please choose atleast 2 Variables from below
u
R
H
t
theta
th
ux
uy
If I choose u and theta then in the next dialogue box (or in the same dialogue box) I can enter the value of variables I've chosen. I also want to display some text over that box for instructions like units of variables etc.
list={'ux','uy','t','u','theta','x','y','r','R','H','th'}[indx,tf] = listdlg('ListString',list,"SelectionMode",'multiple')%list1 is column vector that contains text I want to display in the upcoming dialogue box
list1=["Enter a value of ux in m/s";"Enter a value of uy in m/s";"Enter a value of t in s";"Enter a value of u in m/s";"Enter a value of \theta (in degrees)";"Enter a value of x in m";"Enter a value of y in m";"Enter a value of r in m";"Enter a value of R in m";"Enter a value of H in m";"Enter a value of th in s"];% PROMPT IS NOT WORKING PROPERLY !!!
prompt = {'',strjoin(arrayfun(@(x) num2str(x),list1(indx),'UniformOutput',false),''',''')};dlgtitle = 'Input Value';% HOW TO CHANGE DEFINPUT VALUES ACCORDING TO THE CHOSEN INPUT VARIABLES?
definput = {'0','0','0','0','0','0','0','0','0','0','0'};opts.Interpreter = 'tex';answer = inputdlg(prompt,dlgtitle,[1 40],definput,opts);
I hope my problem is clear and understandable. Please feel free to ask any questions.
How can I resolve this issue ?
Best Answer