[material_num, material_text, material_all] = xlsread('MaterialList.xlsx', 'B:B');[value_num, value_text, value_all] = xlsread('MaterialList.xlsx', 'C:C');[m,n] = size(material_text)for x=1:mstring_list{x} = material_text(x,1)endset(handles.popupmenu1,'String', string_list)
currently I have this code above which takes words from an excel file and assigns the words into the variable string_list using a for loop. My problem is using string_list to input multiple words into the popup menu. Everytime I run this I get the error
Error using matlab.ui.control.UIControl/setWhile setting the 'String' property of 'UIControl':Cell arrays input to String property may only contain character and numeric matrices.Error in SolderAngleGUI3>SolderAngleGUI3_OpeningFcn (line 62)set(handles.popupmenu1,'String', string_list)Error in gui_mainfcn (line 220) feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});Error in SolderAngleGUI3 (line 42) gui_mainfcn(gui_State, varargin{:});
I want the list to be made before my GUI appears so I currently have this code in the OpeningFcn of the GUI.
Are there problems with my code? Are they located in the correct function?
Best Answer