![MATLAB學(xué)生成績管理系統(tǒng)_第1頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/20/0e2f108f-87f3-4ee1-bc3a-20244b394475/0e2f108f-87f3-4ee1-bc3a-20244b3944751.gif)
![MATLAB學(xué)生成績管理系統(tǒng)_第2頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/20/0e2f108f-87f3-4ee1-bc3a-20244b394475/0e2f108f-87f3-4ee1-bc3a-20244b3944752.gif)
![MATLAB學(xué)生成績管理系統(tǒng)_第3頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/20/0e2f108f-87f3-4ee1-bc3a-20244b394475/0e2f108f-87f3-4ee1-bc3a-20244b3944753.gif)
![MATLAB學(xué)生成績管理系統(tǒng)_第4頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/20/0e2f108f-87f3-4ee1-bc3a-20244b394475/0e2f108f-87f3-4ee1-bc3a-20244b3944754.gif)
![MATLAB學(xué)生成績管理系統(tǒng)_第5頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/20/0e2f108f-87f3-4ee1-bc3a-20244b394475/0e2f108f-87f3-4ee1-bc3a-20244b3944755.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、function varargout = untitled1(varargin)gui_Singleton = 1;gui_State = struct('gui_Name', mfilename, . 'gui_Singleton', gui_Singleton, . 'gui_OpeningFcn', untitled1_OpeningFcn, . 'gui_OutputFcn', untitled1_OutputFcn, . 'gui_LayoutFcn', , . 'gui_Callback'
2、;, );if nargin && ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);endif nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);endfunction untitled1_OpeningFcn(hObject, eventdata, handles, varargin)handles.output = hObject; %取數(shù)han
3、dles.data=; %生成data空數(shù)組handles.text=; %生成text空數(shù)組guidata(hObject, handles); %保存更新數(shù)據(jù)handles.output = hObject;guidata(hObject, handles);function varargout = untitled1_OutputFcn(hObject, eventdata, handles)varargout1 = handles.output;%excel表格入口function daoru_Callback(hObject, eventdata, handles) %可編輯信息表格
4、導(dǎo)入文本框function daoru_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');endfunction sure_Callback(hObject, eventdata, handles) %導(dǎo)入數(shù)據(jù)確定按鈕FileNam
5、e,PathName=uigetfile('*.xls','Choose a file'); str=PathName,FileName; set(handles.daoru,'string',str); %顯示入可編輯數(shù)據(jù)導(dǎo)入文本框 data,text_data=xlsread(str); %讀取str并生成新的數(shù)組 mess1=data(:,1); %訪問excel表格第一列 set(handles.showI,'string',mess1) %把字符串顯示在顯示學(xué)號列表 mess3=data(:,3); %訪問excel表格
6、第三列 set(handles.showc,'string',mess3) %把字符串顯示在顯示語文列表 mess4=data(:,4); %訪問excel列表第四列 set(handles.showm,'string',mess4) %把字符串顯示在顯示數(shù)學(xué)列表 mess5=data(:,5); %訪問excel列表第五列 set(handles.showe,'string',mess5) %把字符串顯示在顯示英語列表 mess2=text_data(2:end,2); %訪問excel列表第二列 set(handles.shown,'
7、string',mess2) %把字符串顯示在顯示名字列表 handles.mess2=mess2 handles.data=data; %保存數(shù)據(jù) handles.text=text_data; guidata(hObject, handles);%信息查詢顯示口function searchz_Callback(hObject, eventdata, handles) %可編輯總分輸出文本框function searchz_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,
8、9;BackgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');endfunction searche_Callback(hObject, eventdata, handles) %可編輯英語輸出文本框function searche_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'Bac
9、kgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');endfunction searchm_Callback(hObject, eventdata, handles) %可編輯數(shù)學(xué)輸出文本框function searchm_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'Backgrou
10、ndColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');endfunction searchc_Callback(hObject, eventdata, handles) %可編輯語文輸出文本框function searchc_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundCol
11、or'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');endfunction searchp_Callback(hObject, eventdata, handles) %可編輯名次輸出文本框function searchp_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor
12、9;), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');end%信息輸入口function ID_Callback(hObject, eventdata, handles) %可編輯學(xué)號輸入信息文本框function ID_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), ge
13、t(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');endfunction name_Callback(hObject, eventdata, handles) %可編輯名字輸入信息文本框function name_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'
14、defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');endfunction searchso_Callback(hObject, eventdata, handles) %搜索確定按鈕str=get(handles.ID,'string'); %學(xué)號字符串信息輸入查找if length(str)=0 %空字符串str_temp=str2double(str); %字符串轉(zhuǎn)換為數(shù)值l1=handles.data(:,1);l2=length(l1)
15、;l3=l2+201200;if (201200<str_temp)&&(str_temp<=l3) %學(xué)號查詢范圍 set(,'string','') %名字輸入框?yàn)榭?index=find(handles.data(:)=(str_temp); %查找全元素與學(xué)號數(shù)值相等的數(shù)據(jù) i,j=ind2sub(size(handles.data),index); %把單序號轉(zhuǎn)換成全下表編號 str1=handles.data(i,:); %生成只訪問i行的數(shù)組 str11=; %生成新的空數(shù)組str11for i=
16、1:size(handles.data,2) %for語句,初始值為1,步長為1,最大值為size值end str11=strcat(str11,num2str(str1(i); %橫向連接字符串 set(handles.searchc,'string',num2str(str1(3); %把字符串顯示在顯示語文列表 set(handles.searchm,'string',num2str(str1(4); %把字符串顯示在顯示數(shù)學(xué)列表 set(handles.searche,'string',num2str(str1(5); %把字符串顯示在顯
17、示英語列表 set(handles.searchz,'string',num2str(str1(6); %把字符串顯示在顯示總分列表 i=handles.data(:,6); %總分升序 i=flipud(sort(i); %總分降序 val=find(i=str1(6); %總分名次 val=val(1); %總分名次顯示 set(handles.searchp,'string',num2str(val) %總分名次顯示else set(handles.searchc,'string','Nothing'); %顯示無數(shù)據(jù) se
18、t(handles.searchm,'string','Nothing'); set(handles.searche,'string','Nothing'); set(handles.searchz,'string','Nothing'); set(handles.searchp,'string','Nothing');endelse name1=get(,'string'); %獲得信息入口名字 name2=char(hand
19、les.text(2:end,2); %名字字符串轉(zhuǎn)換 name11=name1(1) %只顯示姓 name12=name1(2) %只顯示名 name21=char(name2(:,1) %只顯示姓 name22=name2(:,2) %只顯示名 i,j=find(name21=name11) %姓位置查找 m,n=find(name22=name12) %名位置查找 if i=m %行標(biāo)確定 str1=handles.data(i,:); %查找全部數(shù)據(jù) set(handles.searchc,'string',num2str(str1(3) %把字符串顯示在顯示語文列表
20、set(handles.searchm,'string',num2str(str1(4) %把字符串顯示在顯示數(shù)學(xué)列表 set(handles.searche,'string',num2str(str1(5) %把字符串顯示在顯示英語列表 set(handles.searchz,'string',num2str(str1(6) %把字符串顯示在顯示總分列表 i=handles.data(:,6); %總分升序 i=flipud(sort(i); %總分降序 val=find(i=str1(6); %總分名次 val=val(1); set(han
21、dles.searchp,'string',num2str(val) %總分名次顯示 else set(handles.searchc,'string','Nothing'); %顯示無數(shù)據(jù) set(handles.searchm,'string','Nothing'); set(handles.searche,'string','Nothing'); set(handles.searchz,'string','Nothing'); set(handl
22、es.searchp,'string','Nothing'); endendfunction showI_Callback(hObject, eventdata, handles) %學(xué)號顯示列表框function showI_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'
23、;BackgroundColor','white');endfunction shown_Callback(hObject, eventdata, handles) %名字顯示列表框function shown_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');endfunction showc_Callback(hObject, eventdata, handles) %語文顯示列表框function showc_CreateFcn
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 水資源節(jié)約的宣傳教育計(jì)劃
- 2025年人造崗石樹脂合作協(xié)議書
- 2025年冷光源:EL冷光片合作協(xié)議書
- 2025年滌綸短纖項(xiàng)目合作計(jì)劃書
- 2025年鋁合金精密模鍛件項(xiàng)目合作計(jì)劃書
- 客戶關(guān)系層次化維護(hù)策略
- 數(shù)學(xué)王國里的奇妙旅程讀后感
- 自動化科技設(shè)備公司項(xiàng)目投資合作協(xié)議
- Pinoxaden-Standard-生命科學(xué)試劑-MCE
- Mucic-acid-Standard-生命科學(xué)試劑-MCE
- 山東省春季高考技能考試-汽車專業(yè)必刷必練題庫(600題)
- 膝關(guān)節(jié)前十字韌帶扭傷查房
- 2024建設(shè)工程人工材料設(shè)備機(jī)械數(shù)據(jù)分類和編碼規(guī)范
- 倉庫高位貨架管理制度培訓(xùn)課件
- 工會經(jīng)費(fèi)列支范圍及工會經(jīng)費(fèi)支出范圍
- 道教文化的映射:《三國演義》中的道教元素分析
- 成人高考課件
- 高中英語高考讀后續(xù)寫巧用動作鏈專項(xiàng)練習(xí)(附參考答案和解析)
- 哲學(xué)與人生全套課件146P
- 敬老院設(shè)備采購?fù)稑?biāo)方案(技術(shù)方案)
- 充電樁采購安裝售后服務(wù)方案
評論
0/150
提交評論