MATLAB: How to change menu options based on user input

comparingMATLABmatrixmenu

i have two matrix at the same size, i need to compare them and i need to ask users which section they want to go based on comparison results. how can i do this ?

Best Answer

Example:
if mean2(A) <= mean2(B)
set(handles.listbox1, 'String', {'Sort A ascending', 'Sort A descending'});
else
set(handles.listbox1, 'String', {'Sort B ascending', 'Sort B descending'});
end