Hi! I would like to take all the variables from the workspace starting with C (which are structs of data)
S = whos(C*)
And display them in a list to let the user choose some of them to be var1, var2… So the code would run with these var1, var2 depending the ones choosed from the user. Tried with listdlg
s= whos( 'C*');str = {s.name};[z,v] = listdlg('PromptString','Select variables',... 'SelectionMode','multiple',... 'ListString',str)var1 = z(1);var2 = z(2);...
But Z gives me only the position, not the variables choosed. If choose the 1st and 3rd, Z would be ( 1 3),instead of C… and C…(the variables choosed). Any idea in how to do it?
Thanks in advance.
Best Answer