function fctTable(hObject, eventdata)
handles = guidata(hObject);
if eventdata.Indices(2) == 1
if eventdata.NewData == 0
set(handles.plots{eventdata.Indices(1)}, 'visible', 'off');
else
set(handles.plots{eventdata.Indices(1)}, 'visible', 'on')
end
end
guidata(hObject, handles);
end
function PB_load_Callback(hObject, eventdata, handles)
handles = guidata(hObject);
[FileName,PathName] = uigetfile('*.txt');
if FileName == 0
return
else
cla(handles.axes1);
[~, name] = fileparts(FileName);
fileName = fopen(fullfile(PathName, FileName),'r');
C = textscan(fileName,...
'%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s',...
'Delimiter', ';');
end
for i = 1:length(C)
handles.colors{i}= rand(1,3);
end
.
.
.
a = 1;
for i = 1:2:15
handles.plots{a} = plot(A, channel(a).current, 'color',...
handles.colors{i},'DisplayName', strcat('channel\_', num2str(a-1)));
a = a+1;
end
legend('show');
guidata(hObject, handles)
end
I will attach the files if someone want to try the code.
Thanks in advance.