MATLAB: Loading in to the POPUP menu of GUI

guiloadpopup menu

hello.. Is there a code to load a value to the popup menu from .mat file… there should be an option to select or change the data even after loading the value!!

Best Answer

hello Yoav Livneh and Geoff Hayes.. thanks for your valuable comments.. I somehow got the answer for the above question and I wud like to share with you ppl..
I have 5 options in the POPUP menu as awake sleeping waiting in gym out
we have to compare the data got from the .mat file and then change the value property according to it. he I'm sharing my code of load push button..
call back function of pushbutton will look like below
function load_pb_Callback(hObject, eventdata, handles) [filename pathname] = uigetfile('*.mat','Select the MATLAB code file'); L = load( fullfile( pathname, filename ) ); varnames = fieldnames(L); % Message=num2str(L.(varnames{1})); Status= num2str(L.(varnames{2})); if strcmp(Status,'awake') set(handles.popup,'value', 1) elseif strcmp(Status,'sleeping') set(handles.popup,'value', 2) elseif strcmp(Status,'waiting') set(handles.popup,'value',3) elseif strcmp(Status,'out') set(handles.popup,'value', 5) elseif strcmp(Status,'in gym') set(handles.popup,'value', 4) end
regards madhu