how can i load a double from a mat file that i selected using push button in gui matlab , whatever the matfile i be able to extract an load a double from it and use it ex: i have a mat file called 1.mat and another 2.mat
whos -file 1.mat Name Size Bytes Class AttributesX1RPM 1x1 8 double X1_BA_time 122136x1 977088 double X1_DE_time 122136x1 977088 double X1_FE_time 122136x1 977088 double
dt=new.X1_DE_time;
2nd mat file 2.mat whos -file 2.mat Name Size Bytes Class AttributesX2RPM 1x1 8 double X2_BA_time 122136x1 977088 double X2_DE_time 122136x1 977088 double X2_FE_time 122136x1 977088 double
dt=new.X2_DE_time;
using GUI now 1st push putton
function Data_Callback(~, ~, handles)[filename, pathname] = uigetfile({'*.mat'},'File Selector');set(handles.text5,'String', filename)% showing full path name
handles.data=load([pathname, filename]);data=filename;setappdata(0,'data',data);
2nd push putton
function ok_Callback(hObject, eventdata, handles)new=load(getappdata(0,'data'));
now i have the problem , how can i load de time whatever the mat file selected
dt=new.X1 or X2 or,...._DE_time;
Best Answer