1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[filename, pathname] = uiputfile('*.mat','Ouvrir')
if isequal(filename,0) | isequal(pathname,0)
disp('User selected Cancel')
else
disp(['User selected',fullfile(pathname,filename)])
DATA=get(handles.uitable1,'data')
save(fullfile(pathname,filename),'DATA')
Tableau=[];
tableau=struct('techno',{DATA(1,1);str2double(DATA(2:8,1))});
Tableau=[Tableau,tableau]
nombre_batt=length(Tableau(1,:))
parametre=[];
for i=1:nombre_batt
parametre=[parametre,Tableau(2,i).techno];
end
parametre
end |
Partager