基于matlab的学生成绩分析系统设计

合集下载

基于MATLABGUI的成绩分析系统设计与应用

基于MATLABGUI的成绩分析系统设计与应用

基于MATLABGUI的成绩分析系统设计与应用作者:耿爱华魏幼平李春奇陈薪来源:《电脑知识与技术》2020年第25期摘要:随着学生规模和信息量的日益扩大,就需要开发一个实用的成绩分析系统来提高老师们的工作效率。

本着这样的需求设计开发出一款基于MATLAB GUI成绩分析系统,通过读取一份成绩单文件便可以对学生成绩做一个数据处理和细致分析。

该数据分析界面友好、操作方便、交互性强、维护简易,实现了数据的可视化操作,并极大提高了教学办公的效率和效果。

关键词:MATLAB;GUI设计;数据处理;成绩分析中图分类号:TP311 ; ; ; ; ;文献标识码:A文章编号:1009-3044(2020)25-0031-05Abstract: With the increasing of student size and information, it is necessary to develop a practical achievement analysis system to improve the work efficiency of teachers. In line with such requirements to design and develop a performance analysis system based on MATLAB GUI, just by reading a transcript file can do a detailed analysis of student performance. The data analysis interface is friendly, easy to operate, interactive, easy to maintain, the realization of data visualization operation, greatly improve the efficiency and effect of teaching office.Key words: MATLAB; GUI design; data processing; performance analysis1引言吳浩宏[1]在对中职院校学生成绩管理信息系统的研究技术主要涉及Java开发技术的SQL Server 2005数据库开发技术,研究所使用的分析方法是UML面向对象分析方法。

matlab课程成绩管理系统设计

matlab课程成绩管理系统设计

MATLAB 课程成绩管理系统设计一、系统概述MATLAB 课程成绩管理系统是一个用于管理学生成绩的软件系统。

该系统旨在提供一个方便、高效的方式来存储、查询、修改和分析学生成绩。

通过该系统,教师可以轻松地录入学生信息、录入成绩、查看成绩报告、生成成绩单等。

学生可以查询自己的成绩和排名,了解自己的学习情况。

二、系统功能1. 学生信息管理:录入、修改和删除学生信息,包括姓名、学号、班级等。

2. 成绩录入:录入学生的考试成绩、作业成绩、实验成绩等。

3. 成绩查询:根据学生姓名、学号或班级等信息查询学生的成绩。

4. 成绩分析:统计学生的平均分、最高分、最低分等,生成成绩报告和排名。

5. 成绩导出:将学生成绩导出为 Excel 文件,方便其他应用程序使用。

6. 系统设置:设置用户权限、修改密码等。

三、系统设计1. 数据结构设计:使用数据库来存储学生信息和成绩数据,设计相应的表结构,包括学生表、成绩表等。

2. 用户界面设计:使用 MATLAB GUI 设计用户界面,包括菜单栏、工具栏、文本框、按钮等控件。

3. 事件处理:为每个控件添加事件处理函数,实现系统的各项功能。

4. 数据交互:通过 MATLAB 的数据交互功能,实现与数据库的连接和数据操作。

5. 报表生成:使用 MATLAB 的报表生成功能,生成成绩报告和排名报表。

四、系统实现1. 安装 MATLAB 和数据库管理系统(如 MySQL),并配置好相应的环境变量。

2. 创建数据库和表结构,导入学生信息和成绩数据。

3. 使用 MATLAB GUI 设计用户界面,添加控件和事件处理函数。

4. 连接数据库,实现数据交互和操作。

5. 编写代码实现各项功能,并进行测试和调试。

6. 将系统打包成可执行文件,方便用户安装和使用。

基于matlab的gui成绩管理系统设计报告

基于matlab的gui成绩管理系统设计报告
else gui_mainfcn(gui_State, varargin{:});
end % End initialization code - DO NOT EDIT
% --- Executes just before chengji2 is made visible. function chengji2_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 arguments to chengji2 (see VARARGIN)
12
具箱,使其设计数学计算方面程序的编写及 其简洁,如果以后有机会一定再好好研究下 Matlab。
13
附录:
function varargout = chengji2(varargin)
% CHENGJI2 M-file for chengji2.fig
%
CHENGJI2, by itself, creates a new CHENGJI2 or raises the existing
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});

基于matlab学生成绩查询GUI设计

基于matlab学生成绩查询GUI设计

有下列xls成绩表要求用matlab设计GUI要求导入xls,能够查询某同学的分数设计运行效果图如下:关键程序:导入数据按钮下的callback函数: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]=uigetfile({'*.xls'},'Choose a file');str=[PathName FileName];set(handles.edit1,'string',str);[data,text_data]=xlsread(str);handles.data=data;handles.text=text_data;guidata(hObject, handles);查询按钮下的callback函数function pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)str=get(handles.edit3,'string');str_temp=str2num(str);index=find(handles.data(:)==str_temp);[i,j]=ind2sub(size(handles.data),index);str1=handles.data(i,:);str11=[];for ix=1:size(handles.data,2)str11=strcat(str11,num2str(str1(ix)));endset(handles.edit2,'string',str);set(handles.edit4,'string',num2str(str1(2)));set(handles.edit5,'string',num2str(str1(3)));set(handles.edit6,'string',num2str(str1(4)));set(handles.edit7,'string',num2str(str1(5)));set(handles.edit8,'string',num2str(str1(6)));在初始化函数中添加:function student_core_view_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 arguments to student_core_view (see VARARGIN)% Choose default command line output for student_core_viewhandles.output = hObject;handles.data=[];handles.text=[];% Update handles structureguidata(hObject, handles);。

MATLAB程序实现学生成绩管理

MATLAB程序实现学生成绩管理

XXXXXX大学MATLAB期末论文题目:基于MATLAB实现的学生成绩管理程序作者:QQ52011811学号:XXX指导老师:XXX单位:物理与电子信息工程学院班级:08 级通信工程一班2010年6月目录序言··················································································第03页摘要··················································································第04页第一章··················································································第06页第二章··················································································第08页参考文献··············································································第10页序言MATLAB是一种与数学密切相关的算法语言,是目前在工程界流行最为广泛的计算机语言,也是当今最优秀的科技应用软件之一。

matlab_GUI 学生成绩管理系统

matlab_GUI 学生成绩管理系统

function varargout = gui(varargin)% GUI M-file for gui.fig% GUI, by itself, creates a new GUI or raises the existing% singleton*.%% H = GUI returns the handle to a new GUI or the handle to% the existing singleton*.%% GUI('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in GUI.M with the given input arguments.%% GUI('Property','Value',...) creates a new GUI or raises the% existing singleton*. Starting from the left, property value pairs are % applied to the GUI before gui_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application % stop. All inputs are passed to gui_OpeningFcn via varargin.%% *See GUI Options on GUIDE's 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 help gui% Last Modified by GUIDE v2.5 03-Dec-2014 19:33:07% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ...'gui_Singleton', gui_Singleton, ...'gui_OpeningFcn', @gui_OpeningFcn, ...'gui_OutputFcn', @gui_OutputFcn, ...'gui_LayoutFcn', [] , ...'gui_Callback', []);if nargin && ischar(varargin{1})gui_State.gui_Callback = str2func(varargin{1});endif nargout[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});elsegui_mainfcn(gui_State, varargin{:});end% End initialization code - DO NOT EDIT% --- Executes just before gui is made visible.function gui_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 arguments to gui (see VARARGIN)% Choose default command line output for guihandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes gui wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = gui_OutputFcn(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 structurevarargout{1} = handles.output;% --- Executes on selection change in listbox1.function listbox1_Callback(hObject, eventdata, handles)% hObject handle to listbox1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = cellstr(get(hObject,'String')) returns listbox1 contents as cell array% contents{get(hObject,'Value')} returns selected item from listbox1 % --- Executes during object creation, after setting all properties. function listbox1_CreateFcn(hObject, eventdata, handles)% hObject handle to listbox1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: listbox controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end% --- Executes on selection change in listbox2.function listbox2_Callback(hObject, eventdata, handles)% hObject handle to listbox2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = cellstr(get(hObject,'String')) returns listbox2 contents as cell array% contents{get(hObject,'Value')} returns selected item from listbox2% --- Executes during object creation, after setting all properties. function listbox2_CreateFcn(hObject, eventdata, handles)% hObject handle to listbox2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: listbox controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end% --- Executes on selection change in listbox3.function listbox3_Callback(hObject, eventdata, handles)% hObject handle to listbox3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = cellstr(get(hObject,'String')) returns listbox3 contents as cell array% contents{get(hObject,'Value')} returns selected item from listbox3 % --- Executes during object creation, after setting all properties. function listbox3_CreateFcn(hObject, eventdata, handles)% hObject handle to listbox3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: listbox controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end% --- Executes on selection change in listbox4.function listbox4_Callback(hObject, eventdata, handles)% hObject handle to listbox4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = cellstr(get(hObject,'String')) returns listbox4 contents as cell array% contents{get(hObject,'Value')} returns selected item from listbox4 % --- Executes during object creation, after setting all properties. function listbox4_CreateFcn(hObject, eventdata, handles)% hObject handle to listbox4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: listbox controls usually have a white background on Windows.% See ISPC and 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 reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)[a,name]=xlsread('student.xlsx');handles.ID=a(:,1);handles.English=a(:,2);handles.Math=a(:,3);=name(2:end,1);guidata(hObject,handles);set(handles.listbox1,'string',);set(handles.listbox2,'string',handles.ID);set(handles.listbox3,'string',handles.English);set(handles.listbox4,'string',handles.Math);guidata(hObject,handles);% --- Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (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,'ÊÇ')closeelsereturn;end[a,name]=xlsread('student.xlsx');guidata(hObject,handles);set(handles.edit1,'string',handles.guanbi);function edit1_Callback(hObject, eventdata, handles)% hObject handle to edit1 (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 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 a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');endfunction edit2_Callback(hObject, eventdata, handles)% hObject handle to edit2 (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 edit2 as text% str2double(get(hObject,'String')) returns contents of edit2 as a double% --- Executes during object creation, after setting all properties. function 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 and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end% --- Executes on button press in pushbutton3.function pushbutton3_Callback(hObject, eventdata, handles)% hObject handle to pushbutton3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)prompt={'input name '};title='input name';name=inputdlg(prompt,title);i=strcmp(,name);[h,l]=find(i==1);set(handles.listbox1,'string',(h,l));set(handles.listbox2,'string',handles.ID(h,l));set(handles.listbox3,'string',handles.English(h,l));set(handles.listbox4,'string',handles.Math(h,l));% --- Executes on selection change in listbox5.function listbox5_Callback(hObject, eventdata, handles)% hObject handle to listbox5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = cellstr(get(hObject,'String')) returns listbox5 contents as cell array% contents{get(hObject,'Value')} returns selected item from listbox5 % --- Executes during object creation, after setting all properties. function listbox5_CreateFcn(hObject, eventdata, handles)% hObject handle to listbox5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: listbox controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end% --- Executes on selection change in listbox6.function listbox6_Callback(hObject, eventdata, handles)% hObject handle to listbox6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = cellstr(get(hObject,'String')) returns listbox6 contents as cell array% contents{get(hObject,'Value')} returns selected item from listbox6 % --- Executes during object creation, after setting all properties. function listbox6_CreateFcn(hObject, eventdata, handles)% hObject handle to listbox6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: listbox controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end% --- Executes on selection change in listbox7.function listbox7_Callback(hObject, eventdata, handles)% hObject handle to listbox7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = cellstr(get(hObject,'String')) returns listbox7 contents as cell array% contents{get(hObject,'Value')} returns selected item from listbox7 % --- Executes during object creation, after setting all properties. function listbox7_CreateFcn(hObject, eventdata, handles)% hObject handle to listbox7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: listbox controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end% --- Executes on selection change in listbox8.function listbox8_Callback(hObject, eventdata, handles)% hObject handle to listbox8 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = cellstr(get(hObject,'String')) returns listbox8 contents as cell array% contents{get(hObject,'Value')} returns selected item from listbox8 % --- Executes during object creation, after setting all properties. function listbox8_CreateFcn(hObject, eventdata, handles)% hObject handle to listbox8 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: listbox controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end% --- Executes on selection change in listbox9.function listbox9_Callback(hObject, eventdata, handles)% hObject handle to listbox9 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = cellstr(get(hObject,'String')) returns listbox9 contents as cell array% contents{get(hObject,'Value')} returns selected item from listbox9 % --- Executes during object creation, after setting all properties. function listbox9_CreateFcn(hObject, eventdata, handles)% hObject handle to listbox9 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: listbox controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');endfunction edit3_Callback(hObject, eventdata, handles)% hObject handle to edit3 (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 edit3 as text% str2double(get(hObject,'String')) returns contents of edit3 as a double% --- Executes during object creation, after setting all properties. function edit3_CreateFcn(hObject, eventdata, handles)% hObject handle to edit3 (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 and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');endfunction edit4_Callback(hObject, eventdata, handles)% hObject handle to edit4 (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 edit4 as text% str2double(get(hObject,'String')) returns contents of edit4 as a double% --- Executes during object creation, after setting all properties. function edit4_CreateFcn(hObject, eventdata, handles)% hObject handle to edit4 (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 and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end% --- Executes on button press in pushbutton4.function pushbutton4_Callback(hObject, eventdata, handles)% hObject handle to pushbutton4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)prompt={'delete name'};title='delete name';name= inputdlg(prompt,title);i=strcmp(,name);[row,col]=find(i==1);(row,:)=[];handles.ID(row,:)=[];handles.English(row,:)=[];handles.Math(row,:)=[];set(handles.listbox1,'string',);set(handles.listbox2,'string',handles.ID);set(handles.listbox3,'string',handles.English);set(handles.listbox4,'string',handles.Math);x=' ';xlswrite('student.xlsx',x,'A2:Z100');xlswrite('student.xlsx',,'Sheet1','A2');xlswrite('student.xlsx',handles.ID,'Sheet1','B2');xlswrite('student.xlsx',handles.English,'Sheet1','C2');xlswrite('student.xlsx',handles.Math,'Sheet1','D2');% --- Executes on button press in pushbutton5.function pushbutton5_Callback(hObject, eventdata, handles)% hObject handle to pushbutton5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)prompt={'name','ID','English','Math'};title='new student';lines=[1 1 1 1];answer=inputdlg(prompt,title,lines);n = length();{n+1,1}=answer{1,1};handles.ID(n+1,1)=str2num(answer{2,1});handles.English(n+1,1)=str2num(answer{3,1});handles.Math(n+1,1)=str2num(answer{4,1});guidata(hObject,handles);set(handles.listbox1,'string',);set(handles.listbox2,'string',handles.ID);set(handles.listbox3,'string',handles.English);set(handles.listbox4,'string',handles.Math);x=' ';xlswrite('student.xlsx',x,'A2:Z100');xlswrite('student.xlsx',,'Sheet1','A2');xlswrite('student.xlsx',handles.ID,'Sheet1','B2');xlswrite('student.xlsx',handles.English,'Sheet1','C2');xlswrite('student.xlsx',handles.Math,'Sheet1','D2');function edit5_Callback(hObject, eventdata, handles)% hObject handle to edit5 (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 edit5 as text% str2double(get(hObject,'String')) returns contents of edit5 as a double% --- Executes during object creation, after setting all properties. function edit5_CreateFcn(hObject, eventdata, handles)% hObject handle to edit5 (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 and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');endfunction edit6_Callback(hObject, eventdata, handles)% hObject handle to edit6 (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 edit6 as text% str2double(get(hObject,'String')) returns contents of edit6 as a double% --- Executes during object creation, after setting all properties. function edit6_CreateFcn(hObject, eventdata, handles)% hObject handle to edit6 (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 and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');endfunction edit7_Callback(hObject, eventdata, handles)% hObject handle to edit7 (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 edit7 as text% str2double(get(hObject,'String')) returns contents of edit7 as a double% --- Executes during object creation, after setting all properties. function edit7_CreateFcn(hObject, eventdata, handles)% hObject handle to edit7 (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 and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');endfunction edit8_Callback(hObject, eventdata, handles)% hObject handle to edit8 (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 edit8 as text% str2double(get(hObject,'String')) returns contents of edit8 as adouble% --- Executes during object creation, after setting all properties. function edit8_CreateFcn(hObject, eventdata, handles)% hObject handle to edit8 (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 and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');endfunction edit9_Callback(hObject, eventdata, handles)% hObject handle to edit9 (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 edit9 as text% str2double(get(hObject,'String')) returns contents of edit9 as a double% --- Executes during object creation, after setting all properties. function edit9_CreateFcn(hObject, eventdata, handles)% hObject handle to edit9 (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 and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end% --- Executes on selection change in popupmenu1.function popupmenu1_Callback(hObject, eventdata, handles)% hObject handle to popupmenu1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array% contents{get(hObject,'Value')} returns selected item from popupmenu1str=get(hObject,'String');val=get(hObject,'Value');switch str{val};case'English'handles.current_data=handles.English;bar(handles.English);case'Math'handles.current_data=handles.Math;bar(handles.Math);endguidata(hObject,handles);% --- Executes during object creation, after setting all properties. function popupmenu1_CreateFcn(hObject, eventdata, handles)% hObject handle to popupmenu1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: popupmenu controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end。

用Matlab计算学分绩

用Matlab计算学分绩

很多同学不愿手动按计算器计算学分绩,如果他们有excel版的成绩单,并且安装了Matlab,那么利用下面的代码就可以计算出100满分制和4.0满分制算法下的学分绩了。

其中100分满分制下的成绩x对应的4.0满分制下的成绩为
4−3∗(100−x)2,x≥60
0, x<60
新建一个M文件,复制下面的代码:
clear all;
close all;
clc;
NUM=xlsread('record.xlsx');
[n,~]=size(NUM);
cre=0;
s1=0;
s2=0;
for i=1:n
if(~isnan(NUM(i,2)))
cre=cre+NUM(i,1);
s1=s1+NUM(i,2).*NUM(i,1);
if(NUM(i,2)>=60)
s2=s2+(4-3*(100-NUM(i,2)).^2/1600).*NUM(i,1);
end
end
end
g1=s1/cre;
g2=s2/cre;
disp(['the gpa in 100 is ',num2str(g1)]);
disp(['the gpa in 4.0 is ',num2str(g2)]);
clear all;
在M文件所在文件夹中,新建一个record.xlsx文件,第一列存储课程的学分,第二列存储课程的成绩(成绩一列中允许出现“通过”、“优秀”等文字):
运行M文件,即可查看结果:
顺祝每位同学都能在大学取得满意的成绩,以内心的阳光驱散生活中的雾霾。

matlabGUI用户界面设计学生成绩管理系统完整截图

matlabGUI用户界面设计学生成绩管理系统完整截图

E23 ▼ A BCD EnglishIDnam e00993753874366415 6 9 3 53 8436 43504789548354664 4687775582 56 44585666644 5 5 6 66 4謹s s粋壽蠶鬻SIFil* Ueit Sal?A J - ■a •F nt '33 a ■□为function pushbutt on 1..Callback (hObject, ev&nt data, handles)□ % hObject handle to pushbutt on 1 (see GCBO)% event data reserved - to be defined in a future version of MATLAB% handles structure with handles and user d^ta (see GUIDATA)[ij name]^xlsreadf student ・ xlsx");handles. ID=a(:j 1);handles・ English=a(:^ 2):handles. Math=a(:, 3):handles・ najne=name (2: end^ 1);guidataChObject, handles):set (handles, listboxU ' st ring\ handles. name);set (handles. Iistbox2, ' strmg\ handles. ID):set (handles. Iistbox3,' string7,handles.English):set (handles, listbox^ r string75 handles. Nath);guidata(hObject, handles):function 卩ushbutton2..Callback<hObject, eventdata3 handles)% hObject handle to pu.shbutton.2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) button=Questdlc(,是否确认关闭’,’关闭确认',’是',’否',’是'):if strcmp (button,'是’) closeelseret urn;end[a^name] =xlsread(,student .xlsx'):guidata(hObject, handles):set (handles, edit 1, string handles, guanbi):UKDUUlPb UXl UUllUIl piDAb XII pU^XlUUL I. UIl J.耳function pushbutton3..Callbaclc (hObjectj event data^ handles)申%kObject handle to pushbutton3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) prcanpt={ input name }: t itle=' input name";najr.e= input dig (prompt, title);i=strcmp (handles・ nanej nanie);[t»j l]=find(i=l):set (handles, listb0x1$ * string,s (hj 1)):set (handles. Iistbox2,' string', handles. ID(h, 1));set (handles. Iistbox3s* st ring *, handl es. Engli sh (h, 1)):set (handles, listbox^ ' st ring \ handles. Nath (h^ 1)):Sfunct i on pushbutton4..Cal l*back (hObject^ event dat① handles)% hObject handle to pushbutton4 (see GCBO)% event data reserved - to be defined in a future version of KATLAB -% handles structure with handles and user da^a (see GUIDATA)prompt = V delete name'}:■title=* delete name* :nane= inputdlg(prompttitle);i=5trcmp (handles.naniE, name):[row, ^ol]=find(i==l);handles.Tiame(row^ :)=[]:handles. ID (rov, :)=[]:handles.Eng 1 ish(r cvr, :) = []:1 iaiidles.Math(ro:)=[].set(handles・ Listboxl, ' string*, handles・ name):set (handles. list'box2J J string5, handles. ID):set (handles・ Listbox3, ' st ring*, handles・ English);set (handles. Listbox^ J string53 handles. Math);•9x= ;xlswrite C student.xlsx,, x』^2:2100"):xlswrit e (' student, xlsx7, handles・ name, * Sheet 1?, A2?);xlswrit e C student. X I SK*, handles・ ID』'Sheet 1'』'):xlswrite C student.xlsx,, handles. English,J Sheet 1:,' C2‘ );・xlswrite C studerrt.xlsx*, handles・ Math, Sheet ' D2‘ ):function pushbut t on5.. C a 1 lb ack (hObject, event da: handles) % hObject handle t o pushbut t on5 (see GCBO)prompt= {' najne\ 'ID' J English',' Hath'}: title= new student' : lines=[1 1 1 1]:answer=inputdlg(prompt,ti11e, lines): n = length (handles, rtajue): handl e s. name {n+1, l}=ans'wer {1, 1}; handles. ID (n+1 j 1) =?.txZxWB (answer {2, 1});handles.English(n+1, 1) = str2nuHi(answer {3^ 1}): handles. Math(n*+l, l)=str2nuni(answer {4, 1});gui dat a (hOb j e ct, handl e s):set (handles ・ listboxl, ' string", handles, name): set (handles ・ lis±box2s ' string 7、handles. ID); set (handles, list box 3,' st ring *, handles. English): (handles, listbox!, stxing ,, handles. Math). 99x= :xlsvrite(, st udent. xlsx \ x, ? A2: Z100*): xlsvrite (' st udent ・ xLsx'」handles ・nam 巴,'Sheet T , A2): xlsvrite (' student ・ xlsx ,t , handles ・ ID,' Sheet TB?'); xlswr ite (' st udent ・ xlsx ? j handles .English 」7 Sheet 17 j ? C2'); xlswrite (r st udent. x 丄 sx\handles .Math,' iheet V ,' DZ"):for.ction pcpupnenul .Callback (hObiect. eventdata, handles) E% l.Object handle to popupnenul (see GCEO)% cvontdats rosorvod - to bo dofinod in s future vorsion of MATLA3-% handles structure wilh handles and user data (see GUIDATA)% Eints: coni ents = cellstr (gel QiObject,J String*)) returns popupnenul cont ent 3 as cell array % cont onto {got (hCbjoct., 7 Valuo^ ) } returns soloct cd item from popupnonul st i=get (hObject, String') val=get (hObject,' Value*);switch stc Ival);caffe English'handles ・ curr ent _ dat a=handle s .English: bar(handles ・English);cac ' Math*handle?・ current_d^t azhindlec ・ Math :bar (handles. Hath)encgaddata (hObjcctjhandles);S% eve nt data reserved. - to be defined in a future version of MATLAB% handles structure vith handles and user data(see GUIDATA)04姓名学号英语数学杭讨A104/>454104 108109527894455855666666644V847778795554882355466644699933755338873443366644V V Viro83604033学生成绩管理系统delete .姓名学号5069993375sa3oe7w33666":?瓷;:"需工.益input naae 匸]|口J区] input name成绩统计绘图关闭[OK ] [ 8耐1 ]英语数学人1088469o45□叵区是否确认关讯ILH 〕d)nev stu•・•匚| j区)5069993375533887344336664478608477787955548523554666449816学生成绩管理系统138.8SB73?「er-.-_3lIR44.X名n奄兰r)«*4l今rGw囲ET«%H伊色。

matlab GUI 学生成绩管理系统

matlab GUI 学生成绩管理系统

西安邮电大学MATLAB及其EDA仿真课内实验报告院(系)名称:电子工程学院姓名:生学李豪名专业称:集成电路设计与集成系统:级班班1202:时间日月2013年1220一、实验内容建立基于图形用户界面GUI的学生成绩管理系统,该系统能够实现学生成绩信息的增加、删除、查询(查询某门课所有学生的成绩并显示排名,查询某个学生的各科成绩并显示排名)、课程成绩统计最高分、最低分、平均分、方差、并显示相应的排名;绘制柱状图、条形图、饼状图、正太分布曲线等功能。

二、实验目的通过本实验使学生掌握图形用户界面GUI的操作和设计流程,并通过编写回调函数巩固前期的知识。

三、报告正文(一)设计思路功绘统单能图计科菜菜成成单单绩绩显示模块成排姓学名绩名号设计步骤与设计内容(二)guideGUI1.启动,命令窗口中输入颜色设置为灰色,edit14,,2.放置控件。

先放置一个Edit Texttag名称设为GUI的功能;设置为‘学生成绩管理系统'String,该控件的功能是显示该,edit4tag再放置五个Edit Text,名称分别设为edit1、edit2、edit3、、edit13、颜色均设置为淡蓝色,String分别设置为‘姓名'其他'、‘成绩\、‘学号'的标题;再放置四‘成绩类型',这些控件的功能作为下面listbox、‘排名',颜色均paiming、xuehao 、grade、名称分别设为个listbox, tagxingming,这些该控件的功能是分别显示对应学生String'设置为‘设置淡蓝色,、名称分别设为再放置五个的姓名、学号、成绩、排名;Edit Text,tagedit7专'String,颜色均设置为淡蓝色,、edit9、edit10edit11 分别设置为、edit8,该控件的功能是显示个人对应的科‘物理',,,业‘‘数学'‘英语'‘体育',颜色设置为灰色,该控件的功axes1名称设为tag,目;再放置一个Axes 能是显示绘制的图; 3.4.保存.fig文件5.编写.m文件,这部分要详细叙述每个子函数的编写思路,每条语句后面要给出注释说明该语句的功能;只需要附上自己编写的回调函数部分,其他系统自动生成的不需要放入报告中。

运用MATLAB实现学分绩点计算的报告

运用MATLAB实现学分绩点计算的报告

MATLAB课程实践报告——关于平均学分、绩点的计算****: ***授课班号: 244501学院:计算机与信息学院组长:陈强(1062310211)组员:冯开蕾(1062310201)沈浩东(1062310323)前言学分,是用于计算学生学习程度的一种计量单位,按学期计算,每门课程及实践环节的具体学分数以专业教学计划的标准为准。

例如像我们学校,挂科后重修,需要按学分收费。

只有总学分积累到专业培训计划的要求后才能毕业,而要拿到学士学位则需要绩点高于专业要求。

学分与绩点,是每位大学生所关心的重要指标之一,很多同学辛苦学习,早出晚归,不断的奔波于教室、图书馆、食堂、寝室之间,为的就是能够考个好成绩,取得好的绩点。

然而在平时我们计算学分与绩点的时候,大都只能用计算器一个一个数据的输入,其过程繁琐麻烦,又容易出错。

为此,我们小组通过讨论,决定了我们研究的课题:运用所学的MATLAB知识,来实现平均学分、绩点的计算这个课题的研究。

一、前期准备1、基础知识的学习,积累课题所需要的知识点。

2、去图书馆借阅相关资料的书籍,学习GUI用户界面设计,归一化二阶系的阶跃统响应曲线绘制。

3、小组分工:冯开蕾主要负责前期准备,以及基本程序框架的搭建;陈强主要负责任务的分配以及对整个程序的处理、调试、运行;沈浩东主要负责论文的编写;二、、程序的编写开始搭建程序的结构1、界面设计:采用GUI程序进行设计,直接用程序语言生成可视化控件(而非利用FIG窗口产生控件);主要是通过Set、 uimenu、 text、 get、 uicontrol 等可视化窗口处理函数,生产基本界面,设置句柄,来实现程序所需的各个功能。

在操作中,我们感受到了句柄就好像C语言中的指针,方便巧妙的实现了各个功能模块之间的连接。

2、成绩导入程序设计;主要是运用了load函数,来载入TXT文件中的成绩,学分等数据。

初始设置:global z score a,TXT文件的调用score(i,j),这样就可以直接得到TXT文件中第i行与第j列的数据;之后根据我们的需求,对其进行处理;3、根据我们学校实际的绩点计算方式平均绩点算子的程序设计:绩点是根据成绩给出的,另外单科学分乘以成绩的绩点,然后把各科的结果加起来除以总学分得到的结果就是平均学分绩点,算子如下for k=1:length(score(:,1));%for循环,依次获取每行的数据;xf=xf+score(k,1);%总学分计算zf=zf+score(k,4).*score(k,1);%总绩点计算jf=zf./xf;%平均绩点计算4、输出口学分与绩点显示的程序设计;在计算得到学分与绩点以后,设置句柄,通过调用set语句,把所得的结果显示在可视化窗口中;5、成绩显示网格添加与显示;调用TXT文件,将成绩放在一个数组中,并设置句柄,直接利用画图函数plot函数,画出以成绩为纵坐标的折线图;在显示得到成绩窗口后发现无法直观的看书各科目的成绩,于是引入了grid on函数,产生网格,我们就可以直观地看出成绩了;三、源程序clf resetglobal z score a%·ÂÕÕ¹éÒ»»¯¶þ½×ϵͳµÄ½×Ô¾ÏìÓ¦ÇúÏßH=axes('unit','normalized','position',[0,0,1,1,],'visible','off');set(gcf,'currentaxes',H);str='\fontname{¿¬Ìå}»¶Ó-ʹÓúӺ£´óѧѧ·Ö¼ÆËãϵͳ£¡';set(gcf,'defaultuicontrolunits','normalized');set(gcf,'defaultuicontrolfontsize',11);set(gcf,'defaultuicontrolhorizontal','left');set(gcf,'menubar','none');str1='ѧ·Ö¼ÆËãϵͳ';set(gcf,'name',str1,'numbertitle','off');cg=uimenu(gcf,'label','Îļþ£¨&F£©');cn=uimenu(gcf,'label','¸¨Öú¹¦ÄÜ£¨&E£©');ch=uimenu(gcf,'label','°ïÖú(&H£©');uimenu(ch,'label','ÏÔʾµ±Ç°´¦ÀíÎļþµÄλÖÃ(&L)',...'callback','set(he1,''string'',z)');uimenu(cg,'label','´ò¿ªÎļþ','callback',...'[str11,str12]=uigetfile({''*.*''});a=[str12,str11];z=a;set(he1,''str ing'',a);')uimenu(cg,'label','Í˳öϵͳ','callback','close;clear');uimenu(cn,'label','Ìí¼ÓMº¯Êýµ½¹¤³Ì','callback','edit');text(0.12,0.93,str,'fontsize',13);hg=get(H,'parent');set(hg,'unit','normalized','position',[0.1,0.2,0.7,0.4]);h_axes=axes('parent',hg,...'unit','normalized','position',[0.1,0.15,0.55,0.7],...'xlim',[0 100],'ylim',[0 100],'fontsize',8);h_text1=uicontrol(hg,'style','text',...'unit','normalized','position',[0.67,0.73,0.25,0.07],...'horizontal','left','string','ÇëÔÚÏ·½ÊäÈëÒª´¦ÀíÊý¾ÝµÄ·¾¶:','fontsiz e',10);hp1=uicontrol(hg,'style','push',...'unit','normalized','position',[0.67,0.30,0.12,0.15],...'string','grid on','callback','grid on');hp2=uicontrol(hg,'style','push',...'unit','normalized','position',[0.67,0.15,0.12,0.15],...'string','grid off','callback','grid off');hp3=uicontrol(hg,'style','push',...'unit','normalized','position',[0.67,0.45,0.12,0.15],...'string','¼ÆËãѧ·Ö','callback',[...'score=load(z);',...'zf=0;xf=0;',...'for k=1:length(score(:,1));',...'xf=xf+score(k,1);end;',...'set(he2,''string'',[''ѧ·Ö£º'',num2str(xf)]);'...]);hp4=uicontrol(hg,'style','push',...'unit','normalized','position',[0.80,0.30,0.12,0.15],...'string','¼ÆË㼨µã','callback',[...'score=load(z);',...'zf=0;xf=0;',...'for k=1:length(score(:,1));',...'xf=xf+score(k,1);zf=zf+score(k,4).*score(k,1);end;',...'jf=zf./xf;',...'set(he2,''string'',[''¼¨µã£º'',num2str(jf)]);'...]);hp5=uicontrol(hg,'style','push',...'unit','normalized','position',[0.80,0.15,0.12,0.15],...'string','ÏÔʾ³É¼¨','callback',['score=load(z);'...'t=1:1:length(score(:,2));',...'h_line=plot(t,score(:,2));']);he1=uicontrol(hg,'style','edit',...'unit','normalized',...'position',[0.67,0.65,0.25,0.07],...'horizontal','left',...'callback','z=get(gcbo,''string'');'...);he2=uicontrol(hg,'style','edit',...'unit','normalized',...'string','Êä³ö¿Ú',...'position',[0.80,0.45,0.12,0.15],...'horizontal','left');四、结果展示1、程序主窗口2、打开需要计算的TXT文件3、数据所存路径的显示:4、计算学分、绩点的展示4、显示成绩以及格点五、收获与总结通过这次做基于MATLAB的项目设计,我们学到了很多。

基于matlab的学生成绩分析系统设计

基于matlab的学生成绩分析系统设计
该课题不仅解决了一项实际问题,同时也提供了解决一般问题的基本思路。首先对于信息的收集及导入,然后根据信息分析所需,其次分析研究内容的可靠性,最后得出结论。应用学生成绩分析系统,可以大大提高工作效率,减少成绩评判的误差。
关键词:MATLAB;学生成绩分析系统;信息
Design of students performance analysis system based on MATLAB
评价学生学习状况的目的是激励优秀学生努力学习取得更好的成缋,同时鼓励基础相对薄弱的学生树立信心,不断进步。然而,现行的评价方式单纯的根据"绝对分数"评价学生的学习状况,忽略了基础条件的差异;只对基础条件较好的学生起到促进作用,对基础条件相对薄弱的学生很难起到鼓励作用。
同时我们也意识到,评价结果只代表评价对象目前的个人情况,在学生学习状况评价时,通过考试或其他评价手段所获得的评价结果,只表明学生目前在某一方面学会的行为或之前所处的位置,代表他们学会了做什么、怎么思考同题和表达思想,评定成绩表明的是学生目前的表现,它不能代表过去也不能预示将来。因为学生的发展是一个动态起伏的过程,而不是一个线性过程。而且学生可能在某一方面成绩不理想,但在其他方面却有出色的表现。评价结果并不一定就是评价对象真实水平的表现,只是对其表现的一种估计。因此,我们不要过分迷信评价的结果,在解释这一结果时不要过分夸大学生的某类差异或变化,更不要轻易给学生贴上“学习缺乏动力”、“没有发展前途”、“太笨了”等标签。
成绩分析系统的基本原理及其系统的工作流程如下图3-1所示:
图3-1成绩分析系统原理图
利用成绩分析系统原理及其运行步骤可方便程序的编写和嵌入,对于其中细节的讨论和研究起着重要的作用,同时,使用上述方法分析成绩,得出结论的方式也是有效且合理的。原理的确立让后面的操作和编程更有信心。

matlab学生成绩管理系统(精品文档)

matlab学生成绩管理系统(精品文档)

编写一个对本班学生本学期成绩管理程序。

输入学号、姓名、科目、成绩(设有5名同学、4门功课)。

能自动对成绩进行单科或综合的排序、查找答:judge=input('是输入(1)还是查找(2)还是排序(3)?');if judge==1for n=1:5txt=['请输入第' int2str(n) '个学生姓名:'];lab{n,1}=input(txt);txt=['请输入第' int2str(n) '个学生学号:'];lab{n,2}=input(txt);txt=['请输入第' int2str(n) '个学生数学成绩:'];lab{n,3}=input(txt);txt=['请输入第' int2str(n) '个学生外语成绩:'];lab{n,4}=input(txt);txt=['请输入第' int2str(n) '个学生语文成绩:'];lab{n,5}=input(txt);txt=['请输入第' int2str(n) '个学生物理成绩:'];lab{n,6}=input(txt);lab{n,7}=lab{n,3}+lab{n,4}+lab{n,5}+lab{n,6};endlab{n+1,1}='none';%留出一个空行以便以后的操作lab{n+1,2}=-1;lab{n+1,3}=-1;lab{n+1,4}=-1;lab{n+1,5}=-1;lab{n+1,6}=-1;save lab labelseif judge==2load lab.matk=input('你是要用学号(1)还是姓名(2)查找?');if k==1num=input('请输入学号');m=1;while(num~=lab{m,2}&&m<=5)m=m+1;endif m>5disp('查无此人')else%txt=['姓名:'+int2str(lab{m,1})];%disp(lab{m,1});disp(lab{m,1});txt=['学号' int2str(lab{m,2})];disp(txt);txt=['数学成绩' int2str(lab{m,2})];disp(txt);txt=['外语成绩' int2str(lab{m,2})];disp(txt);txt=['语文成绩' int2str(lab{m,2})];disp(txt);txt=['物理成绩' int2str(lab{m,2})];disp(txt);endelsename=input('请输入姓名');m=1;while(~strcmp(name,lab{m,1})&&m<=5)m=m+1;endif m>5disp('查无此人')else%txt=['姓名:'+int2str(lab{m,1})];%disp(lab{m,1});disp(lab{m,1});txt=['学号' int2str(lab{m,2})];disp(txt);txt=['数学成绩' int2str(lab{m,3})];disp(txt);txt=['外语成绩' int2str(lab{m,4})];disp(txt);txt=['语文成绩' int2str(lab{m,5})];disp(txt);txt=['物理成绩' int2str(lab{m,6})];disp(txt);endendelseload lab.mat;turn=input('按什么顺序排?从大到小(1)从小到大(2)');info=input('按什么排序?学号(1)数学成绩(2)外语成绩(3)语文成绩(4)物理成绩(5)综合成绩(6)');if turn==1switch infocase 1for flag=1:4for i=5:-1:2if lab{i,2}>=lab{i-1,2}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendcase 2for flag=1:4for i=5:-1:2if lab{i,3}>=lab{i-1,3}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendcase 3for flag=1:4for i=5:-1:2if lab{i,4}>=lab{i-1,4}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendcase 4for flag=1:4for i=5:-1:2if lab{i,5}>=lab{i-1,5}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendcase 5for flag=1:4for i=5:-1:2if lab{i,6}>=lab{i-1,6}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendcase 6for flag=1:4for i=5:-1:2if lab{i,7}>=lab{i-1,7}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendotherwisedisp('未做任何改动');endelseswitch infocase 1for flag=1:4for i=5:-1:2if lab{i,2}<=lab{i-1,2}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendcase 2for flag=1:4for i=5:-1:2if lab{i,3}<=lab{i-1,3}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendcase 3for flag=1:4for i=5:-1:2if lab{i,4}<=lab{i-1,4}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendcase 4for flag=1:4for i=5:-1:2if lab{i,5}<=lab{i-1,5}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendcase 5for flag=1:4for i=5:-1:2if lab{i,6}<=lab{i-1,6}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendcase 6for flag=1:4for i=5:-1:2if lab{i,7}<=lab{i-1,7}for j=1:7lab{6,j}=lab{i-1,j};lab{i-1,j}=lab{i,j};lab{i,j}=lab{6,j};endendendendotherwisedisp('未做任何改动');endendsave lab lab;read=input('排序完成,是否查看?查看(1)不查看(2)');if read==1for k=1:5disp(lab{k,1});txt=['学号' int2str(lab{k,2})];disp(txt);txt=['数学成绩' int2str(lab{k,3})];disp(txt);txt=['外语成绩' int2str(lab{k,4})];disp(txt);txt=['语文成绩' int2str(lab{k,5})];disp(txt);txt=['物理成绩' int2str(lab{k,6})];disp(txt);endendend本程序可完全实现题目中要求的全部功能,但在排序时希望以后可以改为用调用函数的形式来简化程序,而且对于用户错误操作的提醒方面尚有不足。

matlab-GUI--学生成绩管理系统

matlab-GUI--学生成绩管理系统

西安邮电大学MATLAB及其EDA仿真课内实验报告院(系)名称:电子工程学院学生姓名:李豪专业名称:集成电路设计与集成系统班级:1202班时间:2013年12月20日一、实验内容建立基于图形用户界面GUI的学生成绩管理系统,该系统能够实现学生成绩信息的增加、删除、查询(查询某门课所有学生的成绩并显示排名,查询某个学生的各科成绩并显示排名)、课程成绩统计最高分、最低分、平均分、方差、并显示相应的排名;绘制柱状图、条形图、饼状图、正太分布曲线等功能。

二、实验目的通过本实验使学生掌握图形用户界面GUI的操作和设计流程,并通过编写回调函数巩固前期的知识。

三、报告正文(一)设计思路(二)设计步骤与设计内容1.启动GUI,命令窗口中输入guide2.放置控件。

先放置一个Edit Text,tag名称设为edit14,颜色设置为灰色,String设置为‘学生成绩管理系统’,该控件的功能是显示该GUI的功能;再放置五个Edit Text,tag名称分别设为edit1、edit2、edit3、edit4、edit13 ,颜色均设置为淡蓝色,String分别设置为‘姓名’、‘学号’、‘成绩\其他’、‘排名’、‘成绩类型’,这些控件的功能作为下面listbox的标题;再放置四个listbox, tag名称分别设为xingming、xuehao 、grade、paiming,颜色均设置淡蓝色,String设置为‘’,这些该控件的功能是分别显示对应学生的姓名、学号、成绩、排名;再放置五个Edit Text,tag名称分别设为edit7、edit8、edit9、edit10、edit11,颜色均设置为淡蓝色,String分别设置为’专业‘,‘数学’,‘英语’,‘体育’‘物理’,该控件的功能是显示个人对应的科目;再放置一个Axes,tag名称设为axes1,颜色设置为灰色,该控件的功能是显示绘制的图;3.4.保存.fig文件5.编写.m文件,这部分要详细叙述每个子函数的编写思路,每条语句后面要给出注释说明该语句的功能;只需要附上自己编写的回调函数部分,其他系统自动生成的不需要放入报告中。

基于MATLAB的班级成绩分析

基于MATLAB的班级成绩分析

基于MATLAB的班级成绩分析作者:郭变来源:《价值工程》2011年第02期摘要:本文重点介绍了MATLAB强大的绘图功能。

通过应用MATLAB分析班级学生成绩说明其程序的简单,以及程序运行之后的图形显示效果。

使人们体会到MATLAB的编程简单、功能强大的特点。

Abstract: This article introduces the powerful drawing function of MATLAB. The analysis of the application of MATLAB class student scores make clear that the procedure is simple and the procedure running display effect, which make people realize the MATLAB programming is simple and powerful features.关键词: MATLAB;绘图;分析;成绩Key words: MATLAB;drawing;analysis;scores中图分类号:TP39 文献标识码:A文章编号:1006-4311(2011)02-0192-020引言我们通常都会用数据说明一些问题,但是数据有时候说明问题不是很明确。

所以就有可能要对数据进行处理,甚至要求将数据处理为图形的形式,这样人们很容易理解数据的含义。

但是数据处理为图形是一件很难的事情,通常没有人愿意或者说很少一部分会应用办公软件来绘图。

这个问题也是我长久以来需要解决的问题,试图学习办公软件来绘图,但是效果不是很明显。

}1MATLAB软件的应用当我接触到MATLAB软件时,我被它强大的绘图功能折服了,我就如饥似渴的学了起来。

首先MATLAB的绘图函数主要是plot函数,用plot绘制之后,还可以应用图形修饰以及图形注解等函数来将图形处理的更易读易懂。

学生成绩分析报告生成系统的设计

学生成绩分析报告生成系统的设计
Pdf Wr i t e r t W r i t e r = Pdf Wr i t er.
1 系统概 述
求, 我们结 合工作实践做 了以下尝试 。 ( 1 ) 整 理分析考试 信息 , 结 合 学 生 成 绩 分 布 将 题 目 由难 到 易 排 列 。 通 过 大 批 量 考
生 的 实 际成 绩 , 可 以得 到题 目内 容 范畴 , 题
目内 容 描 述 , 题 目难 度 排 序 。 ( 2 ) 结 合 出题 目的 , 将 题 目按 内容 分组 。
核 内 容 将 题 目分 成 若 干 组 , 依 据 考 核 内 容 对 每 组 题 目做 出详 细 描 述 。 体 学 生 范 围和 合 格 位 置 。 通 过 数 据 库 计 算, 得 出 每 个 学 生 的 具 体 分 项 成 绩 及 整 体 学 生在这一 分项的 成绩排 列分布 , 用 中 间 8 O %学 生 的 成 绩 分 布 作 为 该 分 项 的 总 体 信 息。 通过老师的分组讨论 , 合 理 划 定 每一 分 项的 合格位 置。 ( 4 ) 标定学生个体信息 , 完 成 报告 。 在 划
在 教育系统内 , 老师常常通过考试 、 测 性 、 安 全性 [ 4 1 , 而P D F 本 身 也是 平 台 无 关 的 ,
P g . s e t F o n t A n d S i z e ( b f : C h i n e s e K a i t i ,1 0 .
便 于 5 f ) l 验来评价 学生 对所学知识 的掌握 情况 , 并 两 者 的 结 合 将 使 应 用 程 序 更 加 可 靠 , 使 用J 2 E E 平 台, 可 以 将 生 成 Pg. s hO W Te xt Al i gne d( El e me nt . 结合学生 反馈 进一步综 合分析 、 提 高 和 改 跨 平 台 移 植 。
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
4、绘制直方图。作为评价及分析的图像依据,直方图让人一目了然,直方图中包涵了大量统计信息,直观且迅速地将信息传递出来,并为后面判定系统是否符合正态分布提供了依据。
5、正态分布的判定。学生成绩是否服从正态分布关系到试卷质量、教师教学等一系列考试之外的硬件信息,服从正态分布且平均值等都处于系统允许的范围内是即认定系统分析可靠,分析结果可靠。
2、导入成绩。成绩的导入相当重要,在使用excel与matlab连接上,通过命令程序将成绩数据导入matlab运行环境中,成功实现了matlab和excel的联动,使得对于输入数据这一环节更加简便,同时也为后面的分析研究提供了可靠而有效的数据支持。
3、统计数据。统计数据是本系统的关键环节,通过编程将一系列数据进行计算分析得出该组数据的最大值、最小值、平均差、均方差等经验分布数据,为后面绘制直方图提供了可靠地数据基础,同时,平均值,均方差的计算为后面进一步评价成绩作了铺垫。
1.2
本课题主要解决对学生成绩总体的客观评价,通过一系列数据的分析比较,例如平均值,成绩分布等整体数据的处理,以及matlab和excel在数据联动功能方面的应用,所绘制的直方图、正态分布图等图像信息使得分析成绩系统更直观、有效地反映学生此课程这一阶段的表现,进而研究今后的教学重点,以及从教学到考试等一连串过程中的薄弱环节,从而达到教学相长的目的。
本人签名:
日期:
巢湖学院本科毕业论文(设计)使用授权说明
本人完全了解巢湖学院有关收集、保留和使用毕业论文 (设计)的规定,即:本科生在校期间进行毕业论文(设计)工作的知识产权单位属巢湖学院。学校根据需要,有权保留并向国家有关部门或机构送交论文的复印件和电子版,允许毕业论文 (设计)被查阅和借阅;学校可以将毕业论文(设计)的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存、汇编毕业,并且本人电子文档和纸质论文的内容相一致。
The project not only solved a practical problem, but also provides a solution to the general problem of the basic train of thought. For information collection and introduction, and then according to the information required for analysis, followed by the analysis of reliability of content, the final conclusion. Applied result analysis system is reliable and effective, improve work efficiency, reduce the error of result evaluation
MATLAB的图形和可视化能力很好的体现了算法的性能和指标。得到的算法可以在Simulink环境中以模块的形式实现,通过系统的建模,进行系统的动态仿真从而得到算法在系统中的动态验证。分析主要过程是对主体设计的编程,以及调用函数的应用分析过程。以下简单介绍系统工作的基本原理:
1、经验数据分析:衡量教育测量指标的质量的可信度、效率度也是以统计数据
Key words:MATLAB; analysis of student achievement systems; information
1.绪论
1.1选题的意义
众所周知,评价学生的学习效果是教学评价的重要环节。随着素质教育的逐步深入,如何评价学生的学习状况成为我们在学生素质培养方面取得突破的当务之急。
为基础的,通过matlab编程语言和调用相关函数实现对成绩的最大值,最小值,平均值,均方差等统计数据的图形化,并进一步绘制直方图。
2、正态分布原理:教育界普遍认为,当考试试题比较合理、难易适中时,学生成绩基本上服从正态分布,即呈现出“中间大,两头小”的图形分布趋势。大多数学生的成绩处于中等状态,高分段和低分段的学生人数较少,是符合统计学中的统计规律的。
图3-2 程序主界面
3.2.2
运用excel和matlab的数据连接,通过matlab编程语言将excel表格中的数据导入matlab中,进一步调试后完成对数据的解读和分析。
导入成绩的程序如下:
functiondaoru_callback(hObject, eventdata)
handles=guidata(gcf);
保密的毕业论文(设计)在解密后遵守此规定。
本人签名:
日期:
导师签名:
日期:
基于MATLAB的学生成绩分析系统设计
摘 要
本文运用MATLAB工具实现了学生成绩分析系统的设计。该系统分为成绩收录统计模块、成绩分析模块、分析结果评价模块、试卷报告书模块等。通过对学生成绩的分析,结合excel等辅助应用数据分析的结果,对学生学习态度、认知能力、教师教学质量等各方面进行评价总结,进而为教学管理提供可靠的依据。
Abstract
This paper uses MATLAB tools to achieve the student performanceanalysissystem design. The system is divided into grades included statistics module, achievement analysis module, the analysis results evaluation module, test report module. Through the analysis of student achievement, according to excel and other auxiliary applications and data analysis results, the students' learning attitudes, cognitive ability, teachers' teaching quality and other aspects of summary evaluation, and provide reliable basis for teaching management.
评价学生学习状况的目的是激励优秀学生努力学习取得更好的成缋,同时鼓励基础相对薄弱的学生树立信心,不断进步。然而,现行的评价方式单纯的根据"绝对分数"评价学生的学习状况,忽略了基础条件的差异;只对基础条件较好的学生起到促进作用,对基础条件相对薄弱的学生很难起到鼓励作用。
同时我们也意识到,评价结果只代表评价对象目前的个人情况,在学生学习状况评价时,通过考试或其他评价手段所获得的评价结果,只表明学生目前在某一方面学会的行为或之前所处的位置,代表他们学会了做什么、怎么思考同题和表达思想,评定成绩表明的是学生目前的表现,它不能代表过去也不能预示将来。因为学生的发展是一个动态起伏的过程,而不是一个线性过程。而且学生可能在某一方面成绩不理想,但在其他方面却有出色的表现。评价结果并不一定就是评价对象真实水平的表现,只是对其表现的一种估计。因此,我们不要过分迷信评价的结果,在解释这一结果时不要过分夸大学生的某类差异或变化,更不要轻易给学生贴上“学习缺乏动力”、“没有发展前途”、“太笨了”等标签。
不论是对学生的整体学习情况还是单独考虑每个学生的学习情况都能够进行较好的评价。面比起单纯的"绝对分数"评价学生的学习状况,忽略了基础条件的差异,我们运用了各种方法和模型来去避免这类现象的发生,动态的分析每个学生的情况,并从定性和定量两方面分别给出了数值与建议。
2.1系统功能需求
学生成绩分析系统主要功能是完成对学生成绩的分析,对考试成绩及其试卷等整体情况的横向分析,并且形成对个人成绩的动态分布的纵向分析。同时,充分的获取教学信息的基础上,给出在次研究基础条件上的建议,便于分析教学,教务及学生学习规划上的优劣势,为以后的改进提供依据。
成绩分析系统的基本原理及其系统的工作流程如下图3-1所示:
图3-1成绩分析系统原理图
利用成绩分析系统原理及其运行步骤可方便程序的编写和嵌入,对于其中细节的讨论和研究起着重要的作用,同时,使用上述方法分析成绩,得出结论的方式也是有效且合理的。原理的确立让后面的操作和编程更有信心。
3.2系统的设计与完成
6、其他成绩信息分析。及格率以及分数段的比例、班级成绩波动情况等分析有效地拓展了分析思路,并且涵盖了大量分析成绩的重要依据。
7、生成分析报告。在成绩分析的基础上,对符合某种情况的结果,给出相应的建议,生成考试成绩分析分析结果,为老师的教学和对学生个人的培养提供信息。
3.系统的功能设计与实现
3.1系统的原理
4 输出功能
输出相关结果:成绩分布直方图、考试结果的分析以及生成试卷分析。
2.2系统方案设计
2.2.1
本系统的主要模块可大致分为:主界面设定,成绩导入,数据统计,直方图绘制,正态分布规律的判定,评价分析成绩,生成成绩报告等方面。系统功能模块如图2-1所示:
图2-1 学生成绩分析功能模块图
2.2.2
1、主界面设定环节。主界面的设定可以将需要的信息直观而简明地表达出来,通过matlab命令,利用GUI设计面板设计对话框,对话框内容包括了:最高分及其学号,最低分及其学号,班级的平均分,均方差,班级考试人数,直方图等,对输入任何一组相关成绩信息后均可得到相应的信息数据,方便对于大量数据分析统计
该课题不仅解决了一项实际问题,同时也提供了解决一般问题的基本思路。首先对于信息的收集及导入,然后根据信息分析所需,其次分析研究内容的可靠性,最后得出结论。应用学生成绩分析系统,可以大大提高工作效率,减少成绩评判的误差。
关键词:MATLAB;学生成绩分析系统;信息
Design of students performance analysis system based on MATLAB
相关文档
最新文档