收藏 分销(赏)

matlab-GUI学生成绩管理系统源码.doc

上传人:w****g 文档编号:4088845 上传时间:2024-07-29 格式:DOC 页数:57 大小:405.51KB
下载 相关 举报
matlab-GUI学生成绩管理系统源码.doc_第1页
第1页 / 共57页
matlab-GUI学生成绩管理系统源码.doc_第2页
第2页 / 共57页
matlab-GUI学生成绩管理系统源码.doc_第3页
第3页 / 共57页
matlab-GUI学生成绩管理系统源码.doc_第4页
第4页 / 共57页
matlab-GUI学生成绩管理系统源码.doc_第5页
第5页 / 共57页
点击查看更多>>
资源描述

1、主界面源码:function varargout = Main(varargin)% MAIN M-file for Main.fig% MAIN, by itself, creates a new MAIN or raises the existing% singleton*.% H = MAIN returns the handle to a new MAIN or the handle to% the existing singleton*.% MAIN(CALLBACK,hObject,eventData,handles,.) calls the local% function nam

2、ed CALLBACK in MAIN.M with the given input arguments.% MAIN(Property,Value,.) creates a new MAIN or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before Main_OpeningFunction gets called. An% unrecognized property name or invalid value makes pro

3、perty application% stop. All inputs are passed to Main_OpeningFcn via varargin.% *See GUI Options on GUIDEs Tools menu. Choose GUI allows only one% instance to run (singleton).% See also: GUIDE, GUIDATA, GUIHANDLES % Copyright 2002-2003 The MathWorks, Inc. % Edit the above text to modify the respons

4、e to help Main % Last Modified by GUIDE v2.5 12-Jan-2014 09:31:12 % Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, Main_OpeningFcn, . gui_OutputFcn, Main_OutputFcn, . gui_LayoutFcn, , . gui_Callback,

5、);if nargin & ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);end if nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT % - Executes just before Main is made visible.function Main_OpeningFcn(

6、hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% varargin command line arguments to Main (see VARARGIN) % C

7、hoose default command line output for Mainhandles.output = hObject; % Update handles structureguidata(hObject, handles); % UIWAIT makes Main wait for user response (see UIRESUME)% uiwait(handles.figure1); % - Outputs from this function are returned to the command line.function varargout = Main_Outpu

8、tFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Get default command line output from handles s

9、tructurevarargout1 = handles.output; % - Executes on button press in pushbutton_datain.function pushbutton_datain_Callback(hObject, eventdata, handles)% hObject handle to pushbutton_datain (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles an

10、d user data (see GUIDATA)close(gcf);run(untitled); % - Executes on button press in pushbutton_find.function pushbutton_find_Callback(hObject, eventdata, handles)% hObject handle to pushbutton_find (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with ha

11、ndles and user data (see GUIDATA)close(gcf);run(chaxuntongji); % - Executes on button press in pushbutton_change.function pushbutton_change_Callback(hObject, eventdata, handles)% hObject handle to pushbutton_change (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles

12、 structure with handles and user data (see GUIDATA)close(gcf);run(change); % - Executes on button press in pushbutton_delete.function pushbutton_delete_Callback(hObject, eventdata, handles)% hObject handle to pushbutton_delete (see GCBO)% eventdata reserved - to be defined in a future version of MAT

13、LAB% handles structure with handles and user data (see GUIDATA)close(gcf);run(shanchu); % - Executes during object creation, after setting all properties.function figure1_CreateFcn(hObject, eventdata, handles)% hObject handle to figure1 (see GCBO)% eventdata reserved - to be defined in a future vers

14、ion of MATLAB% handles empty - handles not created until after all CreateFcns calledMain=axes(units,normalized,position,0 0 1 1);uistack(Main,down)II=imread(pic4.bmp);image(II)colormap grayset(Main,handlevisibility,off,visible,off); % -%function _Callback(hObject, eventdata, handles)% hObject handle

15、 to (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -%function _Callback(hObject, eventdata, handles)% hObject handle to (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles st

16、ructure with handles and user data (see GUIDATA) % -%function _Callback(hObject, eventdata, handles)% hObject handle to (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % - Executes during object deletion, before

17、 destroying properties.function figure1_DeleteFcn(hObject, eventdata, handles)% hObject handle to figure1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function message_Callback(hObject, eventdata, handles)

18、% hObject handle to close (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)button=msgbox(GUI学生成绩管理系统 ;组长:邱晴;组员:袁媛 黄新星 张婷雯 于洋 王佳浩,关于); % -function close_Callback(hObject, eventdata, handles)% hObject handle to clos

19、e (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)button=questdlg(是否确认关闭,关闭确认,是,否,是);if strcmp(button,是) close;else return;end % - Executes on button press in pushbutton_datain1.function pushbutton_datain1_Callba

20、ck(hObject, eventdata, handles)% hObject handle to pushbutton_datain1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)close(gcf);run(untitled);成绩查询统计源码:function varargout = chaxuntongji(varargin)% CHAXUNTONGJI M-

21、file for chaxuntongji.fig% CHAXUNTONGJI, by itself, creates a new CHAXUNTONGJI or raises the existing% singleton*.% H = CHAXUNTONGJI returns the handle to a new CHAXUNTONGJI or the handle to% the existing singleton*.% CHAXUNTONGJI(CALLBACK,hObject,eventData,handles,.) calls the local% function named

22、 CALLBACK in CHAXUNTONGJI.M with the given input arguments.% CHAXUNTONGJI(Property,Value,.) creates a new CHAXUNTONGJI or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before chaxuntongji_OpeningFunction gets called. An% unrecognized property n

23、ame or invalid value makes property application% stop. All inputs are passed to chaxuntongji_OpeningFcn via varargin.% *See GUI Options on GUIDEs Tools menu. Choose GUI allows only one% instance to run (singleton).% See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to

24、 help chaxuntongji % Last Modified by GUIDE v2.5 11-Jan-2014 14:57:27 % Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, chaxuntongji_OpeningFcn, . gui_OutputFcn, chaxuntongji_OutputFcn, . gui_LayoutFcn

25、, , . gui_Callback, );if nargin & ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);end if nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT % - Executes just before chaxuntongji is made visib

26、le.function chaxuntongji_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% varargin command line

27、arguments to chaxuntongji (see VARARGIN) % Choose default command line output for chaxuntongjihandles.output = hObject; %filename pathname=uigetfile(*.xls,);%fin=pathname filename;%xlsread(pathname filename);%xlsread(students.xls,sheet1); % Update handles structureguidata(hObject, handles); % UIWAIT

28、 makes chaxuntongji wait for user response (see UIRESUME)% uiwait(handles.figure1); % - Outputs from this function are returned to the command line.function varargout = chaxuntongji_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);% hObject hand

29、le to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structure%varargout1 = handles.output; function edit1_Callback(hObject, eventdata, handles)% hObject handle to edi

30、t1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,String) returns contents of edit1 as text% str2double(get(hObject,String) returns contents of edit1 as a double % - Executes during object

31、creation, after setting all properties.function edit1_CreateFcn(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have

32、 a white background on Windows.% See ISPC and COMPUTER.if ispc & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set(hObject,BackgroundColor,white);end function edit2_Callback(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be de

33、fined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,String) returns contents of edit2 as text% str2double(get(hObject,String) returns contents of edit2 as a double % - Executes during object creation, after setting all properties.funct

34、ion edit2_CreateFcn(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows.% See ISPC an

35、d COMPUTER.if ispc & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set(hObject,BackgroundColor,white);end % - Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)% eventdata reserve

36、d - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)a=get(handles.edit2,string);data message=xlsread(students.xls,sheet1);m=message(:,2);l=length(data);l=l+2;for i=1:l if strcmp(m(i),a) chengji=data(i-2,:); xinxi=message(i,:); set(handles.listbo

37、x1,string,xinxi(2); set(handles.listbox2,string,xinxi(1); set(handles.listbox3,string,xinxi(3); set(handles.listbox4,string,xinxi(4); set(handles.listbox5,string,chengji(1); set(handles.listbox6,string,chengji(2); set(handles.listbox7,string,chengji(3); set(handles.listbox8,string,chengji(4);break e

38、lse if i=l msgbox(查无此人,请重新输入,警告,warn); set(handles.edit3,string,); set(handles.edit2,string,);return end end endguidata(hObject, handles); % - Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (see GCBO)% eventdata reser

39、ved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)a=get(handles.edit3,string);data message=xlsread(students.xls,sheet1);m=message(:,1);l=length(data);l=l+2;for i=1:l if strcmp(m(i),a) chengji=data(i-2,:); xinxi=message(i,:); set(handles.list

40、box1,string,xinxi(2); set(handles.listbox2,string,xinxi(1); set(handles.listbox3,string,xinxi(3); set(handles.listbox4,string,xinxi(4); set(handles.listbox5,string,chengji(1); set(handles.listbox6,string,chengji(2); set(handles.listbox7,string,chengji(3); set(handles.listbox8,string,chengji(4);break

41、 else if i=l msgbox(查无此人,请重新输入,警告,warn); set(handles.edit3,string,); set(handles.edit2,string,);return end end endguidata(hObject, handles); % - Executes on selection change in listbox1.function listbox1_Callback(hObject, eventdata, handles)% hObject handle to listbox1 (see GCBO)% eventdata reserved

42、 - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: contents = get(hObject,String) returns listbox1 contents as cell array% contentsget(hObject,Value) returns selected item from listbox1 % - Executes during object creation, after setting all properties.function listbox1_CreateFcn(hObject, eventdata, handles)%

展开阅读全文
部分上传会员的收益排行 01、路***(¥15400+),02、曲****(¥15300+),
03、wei****016(¥13200+),04、大***流(¥12600+),
05、Fis****915(¥4200+),06、h****i(¥4100+),
07、Q**(¥3400+),08、自******点(¥2400+),
09、h*****x(¥1400+),10、c****e(¥1100+),
11、be*****ha(¥800+),12、13********8(¥800+)。
相似文档                                   自信AI助手自信AI助手
搜索标签

当前位置:首页 > 教育专区 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服