Back again to ask more questions about matlab
I am trying to randomize the career when a push button is ran, but I never get the answer in the edit text box, here is my code
function pfc1_Callback(hObject, eventdata, handles)collegechoice=questdlg('Go To College?');if collegechoice == 'Yes' career=randi(9);elseif career==1 set(handles.careerbox1,'String','Entertainer');elseif career==2 set(handles.careerbox1,'String','Computer Consultant');elseif career==3 set(handles.careerbox1,'String','Teacher');elseif career==4 set(handles.careerbox1,'String','Athlete');elseif career==5 set(handles.careerbox1,'String','Sales Person');elseif career==6 set(handles.careerbox1,'String','Police Officer');elseif career==7 set(handles.careerbox1,'String','Artist');elseif career==8 set(handles.careerbox1,'String','Doctor');elseif career==9 set(handles.careerbox1,'String','Accountant');end
Best Answer