matlabgui数据管理系统Word格式文档下载.docx

上传人:b****7 文档编号:22330821 上传时间:2023-02-03 格式:DOCX 页数:17 大小:225.87KB
下载 相关 举报
matlabgui数据管理系统Word格式文档下载.docx_第1页
第1页 / 共17页
matlabgui数据管理系统Word格式文档下载.docx_第2页
第2页 / 共17页
matlabgui数据管理系统Word格式文档下载.docx_第3页
第3页 / 共17页
matlabgui数据管理系统Word格式文档下载.docx_第4页
第4页 / 共17页
matlabgui数据管理系统Word格式文档下载.docx_第5页
第5页 / 共17页
点击查看更多>>
下载资源
资源描述

matlabgui数据管理系统Word格式文档下载.docx

《matlabgui数据管理系统Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《matlabgui数据管理系统Word格式文档下载.docx(17页珍藏版)》请在冰豆网上搜索。

matlabgui数据管理系统Word格式文档下载.docx

functionpushbutton1_Callback(hObject,eventdata,handles)

%hObjecthandletopushbutton1(seeGCBO)

%shujukuguanli();

setappdata(shujukuguanli(),'

str'

3、成绩查询按钮:

%---Executesonbuttonpressinpushbutton2.

functionpushbutton2_Callback(hObject,eventdata,handles)

%hObjecthandletopushbutton2(seeGCBO)

setappdata(chengjichaxun(),'

 

5、成绩直方图按钮:

%---Executesonbuttonpressinpushbutton4.

functionpushbutton4_Callback(hObject,eventdata,handles)

%hObjecthandletopushbutton4(seeGCBO)

setappdata(chengjizhifangtu(),'

6、退出按钮:

%---Executesonbuttonpressinpushbutton6.

functionpushbutton6_Callback(hObject,eventdata,handles)

%hObjecthandletopushbutton6(seeGCBO)

close(cjguanli());

2、子界面:

数据库管理

1、显示整体数据按钮:

functionpushbutton1_Callback(hbject,eventdata,handles)

%[PathName]=uigetfile(('

%str=[PathName];

%set(handles.edit1,'

globalstr1;

str1=getappdata(shujukuguanli(),'

[shuzifuhao]=xlsread(str1);

hj=size(shuzi,1);

handles.xingming=fuhao(2:

hj+1,1);

set(handles.listbox1,'

handles.xingming);

set(handles.listbox3,'

num2str(shuzi(:

2:

end)));

set(handles.listbox2,'

1)));

handles.chengji=shuzi(:

end);

handles.xuehao=shuzi(:

1);

guidata(hObject,handles);

2、设置课程学分按钮:

functionpushbutton2_Callback(hObject,eventdata,handles)%设置各科学分

ke1xuefeng=get(handles.edit3,'

%各科学分

ke2xuefeng=get(handles.edit4,'

ke3xuefeng=get(handles.edit5,'

xuefenghe=ke1xuefeng+ke2xuefeng+ke3xuefeng;

%三课学分之和

ke1xuefeng1=ke1xuefeng/xuefenghe;

%各科学分占比

ke2xuefeng1=ke2xuefeng/xuefenghe;

ke3xuefeng1=ke3xuefeng/xuefenghe;

ke1chengjijiaquan=handles.chengji(:

1).*ke1xuefeng1;

%各科成绩乘以占比

ke2chengjijiaquan=handles.chengji(:

2).*ke2xuefeng1;

ke3chengjijiaquan=handles.chengji(:

3).*ke3xuefeng1;

jiaquanchengji=ke1chengjijiaquan+ke2chengjijiaquan+ke2chengjijiaquan;

set(handles.listbox4,'

num2str(jiaquanchengji));

3、添加按钮:

%---Executesonbuttonpressinpushbutton3.

functionpushbutton3_Callback(hObject,eventdata,handles)%添加函数

%hObjecthandletopushbutton3(seeGCBO)

mima=get(handles.edit11,'

password='

123456'

;

k=strcmp(mima,password);

ifk==0

set(handles.edit11,'

'

密码输入错误请重输!

'

return

else

name1=get(handles.edit6,'

xuehao1=str2num(get(handles.edit7,'

));

kecheng11=str2num(get(handles.edit8,'

kecheng21=str2num(get(handles.edit9,'

kecheng31=str2num(get(handles.edit10,'

handles.xingming=[handles.xingming;

name1];

handles.xuehao=[handles.xuehao;

xuehao1];

handles.chengji=[handles.chengji;

kecheng11,kecheng21,kecheng31];

guidata(hObject,handles);

set(handles.listbox1,'

set(handles.listbox2,'

num2str(handles.xuehao));

set(handles.listbox3,'

num2str(handles.chengji));

xlswrite(str1,handles.xingming,1,'

A2'

xlswrite(str1,handles.xuehao,1,'

B2'

xlswrite(str1,handles.chengji,1,'

C2'

end

4、按姓名查询按钮:

functionpushbutton6_Cllback(hObject,eventdata,handles)%姓名查询

globalmm;

name2=get(handles.edit6,'

aa=strcmp(name2,handles.xingming);

[mmn]=find(aa==1);

xingming=handles.xingming;

xuehao=handles.xuehao;

chengji=handles.chengji;

ifmm==0

无此人!

请重输!

set(handles.edit6,'

xingming(mm,:

));

set(handles.edit7,'

num2str(xuehao(mm,:

)));

set(handles.edit8,'

num2str(chengji(mm,1)));

set(handles.edit9,'

num2str(chengji(mm,2)));

set(handles.edit10,'

num2str(chengji(mm,3)));

End

5、修改按钮:

functionpushbutton5_Callback(hObject,eventdata,handles)%修改函数

name1=get(handles.edit6,'

xuehao1=str2num(get(handles.edit7,'

kecheng11=str2num(get(handles.edit8,'

kecheng21=str2num(get(handles.edit9,'

kecheng31=str2num(get(handles.edit10,'

xingming(mm)=name1;

xuehao(mm)=xuehao1;

chengji(mm,:

)=[kecheng11,kecheng21,kecheng31];

handles.xingming=xingming;

handles.xuehao=xuehao;

handles.chengji=chengji;

xlswrite(str1,handles.xingming,1,'

xlswrite(str1,handles.xuehao,1,'

xlswrite(str1,handles.chengji,1,'

7、返回按钮:

%---Executesonbuttonpressinpushbutton8.

functionpushbutton8_Callback(hObject,eventdata,handles)

%hObjecthandletopushbutton8(seeGCBO)

cjguanli();

close(shujukuguanli());

3、子系统成绩查询:

1、姓名查询按钮:

name=get(handles.edit1,'

str1=getappdata(chengjichaxun(),'

end,1);

[lia,id]=ismember(name,handles.xingming);

xingming(id,:

num2str(xuehao(id,:

num2str(chengji(id,:

3、返回按钮:

close(chengjichaxun());

4、子系统:

成绩排序

1、课程1排序按钮:

functionpushbutton1_Callback(hObject,eventdata,handles)%按课程1降序排序

globalshuzi;

globalfuhao;

str1=getappdata(chengjipaixu(),'

handles.zhongtishuju=shuzi;

zhongtishuju1=sortrows(shuzi,-2);

%排序

xuehao1=zhongtishuju1(:

chengji1=zhongtishuju1(:

hang=size(xuehao1,1);

[id1,id2]=ismember(handles.xuehao,xuehao1);

forpp=1:

hang

xingming1(id2(pp))=handles.xingming(pp);

end

xingming2=xingming1'

handles.xingming22=xingming2;

handles.xuehao22=xuehao1;

handles.chengji22=chengji1;

xingming2);

num2str(xuehao1));

num2str(chengji1));

2、课程2排序按钮:

functionpushbutton2_Callback(hObject,eventdata,handles)%按课程2排序

%globalshuzi;

%globalfuhao;

xingming=fuhao(2:

xuehao=shuzi(:

zhongtishuju3=sortrows(shuzi,-3);

xuehao1=zhongtishuju3(:

chengji1=zhongtishuju3(:

[id1,id2]=ismember(xuehao,xuehao1);

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 经管营销 > 经济市场

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1