I want to load a file with my gui.i do this with the pushbutton(browser2).so far so good.After that i want to use this file to another pushbutton(compute) make some calculations and show the result in a static text.the problem is that after loading the file when i try to use it at pushbutton(compute) the file cant be read.So what i want is fucntion compute to read B
function browser2_Callback(hObject, eventdata, handles)[filename pathname] = uigetfile({'*.txt'},'File Selector');fullpathname=strcat(pathname,filename);text = fileread(fullpathname);set(handles.text7,'String',fullpathname)set(handles.text8,'String',text)filename=fullfile(fullpathname);R=readtable(filename)B=table2array(R) function compute_Callback(hObject, eventdata, handles) for i=1:1:9 x=B(i).*5; disp(x)
Best Answer