健身软件课程设计_第1页
健身软件课程设计_第2页
健身软件课程设计_第3页
健身软件课程设计_第4页
健身软件课程设计_第5页
已阅读5页,还剩42页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

通信建模与仿真课程设计文档 第 1 页 通信建模与仿真课程设计文档通信建模与仿真课程设计文档 健身日记 小 组 名: wingman 小组成员: 20138618 肖键 20138554 潘凌 20138614 周治杰 20138579 何朝云 2015 年 07 月 03 日 通信建模与仿真课程设计文档 第 2 页 Communication Modeling and Simulation Course Design Documentation Fitness diary Team Name: wingman Members: 20138618 xiaojian 20138554 panling 20138614 zhouzhijie 20138579 hezhaoyun 03.July. 2015 通信建模与仿真课程设计文档 第 3 页 摘 要 健身是一种体育项目,尤指包括徒手或用器械的体操,体操可以增强力 量、柔韧性,增加耐力,提高协调,控制身体各部分的能力,从而使身体强 健。健身有诸多好处,经常健身可以美化身体外貌;提高适应性;巩固人与 社会的联系;改进人的个性;改善身体姿势;延缓衰老过程;放松身体;有 助于控制情绪消沉;有益于保持情感的稳定;可以得到良好的睡眠;使人能 更有效地工作;能够很好地适应和应付生活中的紧张场面;使人们能从疲劳 中尽快解脱出来;调节改善全身各系统器官的功能;重新调配全身的血液; 改善全身的氧气供应;保持身体肌肉的体积和重量;给大脑提供更多的血液, 使人精神更为活跃;防止心脏病、冠心病、癌症和关节炎。如今随着人们生 活水平的提高,人们对身体素质的重视程度也越来越高,如今喜欢健身的人 越来越多,但是懂得健身的人却寥寥无几,去健身的能真正坚持下来的就更 加的少,造成这种现象的原因一方面在于人们在短时间内无法不到自身身体 的变化,另一方面在于市场上的健身软件仍然特别匮乏,私人健身教练一般 人又难以承担,于是我们小组针对以上问题,运用 MATLAB 以及 MATLAB GUI 知识自行设计编写一款集健身计划定制,健身动作范例,健身私人相册于一 身的Wingman 健身日记软件。 关键词关键词:健身 健身益处 MATLAB GUI 通信建模与仿真课程设计文档 第 4 页 Abstract Fitness is a sport, especially including unarmed or with instrument gymnastics, gymnastics can enhance the strength, flexibility, increase endurance, improve coordination and the ability to control the various parts of the body, so as to make the body strong. Exercise has many benefits, often exercise can beautify the physical appearance; improve adaptability; consolidate the human and social contact; improved personality; improve posture; aging; relaxation; help control depression; beneficial to maintain emotional stability; to get good sleep can make people more effective; the work; can well adapt to and cope with the tense scene in life; so that people can come out as soon as possible relief from fatigue; improve the systemic organ function; redeploy blood; improve the bodys oxygen supply; keep the volume and weight of the body muscles; provide more blood to the brain, make people the spirit is more active; prevent heart disease, coronary heart disease, cancer and arthritis. Now with the improvement of peoples living standard, people pay more attention to the physical quality is more and more high, more and more people like fitness fitness, but know how people are scanty, going to the gym can really persist even less, reasons for the phenomenon is that people in a short time can not not to change their own body, on the other hand, the market is still lack of special fitness software, personal trainer of ordinary people and difficult to bear, so our group to solve the above problems, the use of MATLAB and MATLAB GUI knowledge to design a set of fitness program written, fitness movement examples, private fitness in a photo album “Wingman exercise diary “software. Key words: Fitness Fitness benefits GUI MATLAB 通信建模与仿真课程设计文档 第 5 页 目目 录录 2015 年 07 月 03 日.1 ABSTRACTABSTRACT .4 1.绪论 .6 1.1 设计背景、目的及意义6 1.2 解决问题6 1.2.1 Gif 图片播放.6 1.2.2 相册问题.6 1.3 研究思路6 1.3.1 量身计划定制.6 1.3.2 指导图片设计.6 1.3.3 相册制作.7 1.3.4 BGM 选择 .7 2.设计过程 .7 2.1 根据需要实现的功能设计 GUI 界面.8 2.2 各模块设计界面9 2.2.1 drawupaplan.9 2.2.2 intelligenttrain10 2.2.3 privatephotoalbum .11 2.2.4 select BGM 12 2.3 分别编写各模块功能实现代码13 2.3.1 背景图片插入.13 2.3.2 Gif 图片播放.13 2.3.3 BIM 值计算.14 2.3.4 计划文档调用.14 2.3.5 音乐类型选择.15 2.3.6 选择相册文件夹.15 2.3.7 保存提醒.16 2.3.8 相册查看.16 2.3.9 定义下一张.17 3.总结与结论 18 主要研究结论.18 研究展望.18 参考文献 19 附 录 20 附录一.20 通信建模与仿真课程设计文档 第 6 页 1. 绪论 1.1 设计背景、目的及意义 Matlab 是新兴的编程语言和可视化工具,它提供了非常强大的编写图形用户界面的功 能,即 GUI(Graphic User Interface) 。考虑到现在的大学生整天都喜欢宅在寝室, 我们希望做出一款软件,能够让同学们走出去,夺取呼吸一下外面的新鲜空气,而不 是整天面对着电脑,就知道打游戏和看电影。所以我们小组决定用 matlab 的 GUI 功 能做一个免费的,方便的健身软件,增强同学们的体质。另一方面,我们小组也希望通 过这一次项目的身体力行,找出自己在 matlab 学习中的短板,找出自己的不足,加以 改正,也算是提升自己的能力吧。 1.2 解决问题 1.2.1 Gif 图片播放 由于 windows 系统本身对 gif 图片的播放就只有网页播放,既不方便,也不美观, 于是我们就使用 movie( F, 20, 2 )播放动图,使得动态图每秒播放 2 帧,重复播放 20 次即直观,又美观。 1.2.2 相册问题 在制作私人相册时,无法固定某个文件夹进行储存照片,无法依次 读取某个文 件夹的照片,我们采用用户固定某个文件夹进行储存照片(但此方法 操作起来有些 繁琐) ,关于照片查看,我们查阅相关资料,采用循环依次读入某个文件夹照片并依 次显示,但此方法用户必须手动选择需查看文件夹中的一张照片) 1.3 研究思路 1.3.1 量身计划定制 我们先通过个组员的明确分工,去网上查找资料,制定好科学合理的健身计划,然后 将其制作成简单明了的 word 文档,然后通过定义函数将 button 与 word 文档关联,实 现一键调取健身计划表的功能。 通信建模与仿真课程设计文档 第 7 页 1.3.2 指导图片设计 通过 movie( F,* , * )函数实现可控频率,多次重复的播放 1.3.3 相册制作 通过一个单独建立的文件夹实现存储和读取 1.3.4 BGM 选择 通过多个 GUI 界面的关联设计实现不同风格,不同歌曲的自由选择 通信建模与仿真课程设计文档 第 8 页 2. 设计过程 2.1 根据需要实现的功能设计 GUI 界面 通信建模与仿真课程设计文档 第 9 页 2.2 各模块设计界面 2.2.1 drawupaplan 通信建模与仿真课程设计文档 第 10 页 2.2.2 intelligenttrain 通信建模与仿真课程设计文档 第 11 页 2.2.3 privatephotoalbum 通信建模与仿真课程设计文档 第 12 页 2.2.4 select BGM 通信建模与仿真课程设计文档 第 13 页 2.3 分别编写各模块功能实现代码 2.3.1 背景图片插入 2.3.2 Gif 图片播放 通信建模与仿真课程设计文档 第 14 页 2.3.3 BIM 值计算 2.3.4 计划文档调用 通信建模与仿真课程设计文档 第 15 页 2.3.5 音乐类型选择 2.3.6 选择相册文件夹 通信建模与仿真课程设计文档 第 16 页 2.3.7 保存提醒 2.3.8 相册查看 通信建模与仿真课程设计文档 第 17 页 2.3.9 定义下一张 通信建模与仿真课程设计文档 第 18 页 3. 总结与结论 主要研究结论 通过本次的 MATLAB 课程 GUI 设计让我们对 MATLAB 尤其是其 GUI 设计的功 能有了进一步的了解认识到了它功能的强大。在 MATLAB 简单的设计中了解了关于 MATLAB 图形用户界面的部分控件的使用方法利用 MATLAB 的 GUI 提供的很多实 用的控件方便用于设计属于自己的图形界面。同时增强了团队的合作能力和沟通交流 能力。GUI 设计的成功也让我们有了更多的自信设计更加高难度的课题。 研究展望 此次 MATLABwingman 健身日记的设计让我们看到 MATLAB 功能的强大功能,虽然 此次设计在某些功能还未完美实现,比如在私人相册方面,我们不能固定某个文件夹 进行储存读取,需要人工选择。在后续的设计研究中,我们会完善改进有瑕疵的功能 及界面。我们想当此软件在功能和界面上完善后,会有很大的市场。当下的年轻人对 健身的热爱以及上班族平时很少有时间锻炼使我们的软件有很大的市场。 通信建模与仿真课程设计文档 第 19 页 参考文献 1Matlab语言及实践教程(第2版) 清华大学出版社、北京交通大学出版社出版 2/jihua/ 3/content/14/1018/09/6418693_417852184.shtml 4/#/download/pc 通信建模与仿真课程设计文档 第 20 页 附 录 附录一 MENU function varargout = Matlab_menu(varargin) % MATLAB_MENU MATLAB code for Matlab_menu.fig % MATLAB_MENU, by itself, creates a new MATLAB_MENU or raises the existing % singleton*. % % H = MATLAB_MENU returns the handle to a new MATLAB_MENU or the handle to % the existing singleton*. % % MATLAB_MENU(CALLBACK,hObject,eventData,handles,.) calls the local % function named CALLBACK in MATLAB_MENU.M with the given input arguments. % % MATLAB_MENU(Property,Value,.) creates a new MATLAB_MENU or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before Matlab_menu_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to Matlab_menu_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 help Matlab_menu % Last Modified by GUIDE v2.5 25-Jun-2015 23:28:16 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, Matlab_menu_OpeningFcn, . gui_OutputFcn, Matlab_menu_OutputFcn, . gui_LayoutFcn, , . gui_Callback, ); if nargin end if nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:); else gui_mainfcn(gui_State, varargin:); end % End initialization code - DO NOT EDIT 通信建模与仿真课程设计文档 第 21 页 % - Executes just before Matlab_menu is made visible. function Matlab_menu_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 Matlab_menu (see VARARGIN) % Choose default command line output for Matlab_menu handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes Matlab_menu wait for user response (see UIRESUME) % uiwait(handles.figure1); % - Outputs from this function are returned to the command line. function varargout = Matlab_menu_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 structure varargout1 = handles.output; % - 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) set(0,currentfigure,Matlab_drawupaplan); % - 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) set(0,currentfigure,Matlab_intelligenttrain); % - 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) set(0,currentfigure,Matlab_selectBGM); 通信建模与仿真课程设计文档 第 22 页 % - 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) set(0,currentfigure,Matlab_privatephotoalbum); % - 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) winopen(C:UsersjianDesktopMATLAB()16 _.avi); % - Executes during object creation, after setting all properties. function axes1_CreateFcn(hObject, eventdata, handles) % hObject handle to axes1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called ha=axes(units,normalized,position,0 0 1 1); uistack(ha,down) II=imread(2.jpg); image(II) colormap red set(ha,handlevisibility,off,visible,off); % Hint: place code in OpeningFcn to populate axes1 INTELLIGENTTRAIN function varargout = Matlab_intelligenttrain(varargin) % MATLAB_INTELLIGENTTRAIN MATLAB code for Matlab_intelligenttrain.fig % MATLAB_INTELLIGENTTRAIN, by itself, creates a new MATLAB_INTELLIGENTTRAIN or raises the existing % singleton*. % % H = MATLAB_INTELLIGENTTRAIN returns the handle to a new MATLAB_INTELLIGENTTRAIN or the handle to % the existing singleton*. % % MATLAB_INTELLIGENTTRAIN(CALLBACK,hObject,eventData,handles,.) calls the local % function named CALLBACK in MATLAB_INTELLIGENTTRAIN.M with the given input arguments. % % MATLAB_INTELLIGENTTRAIN(Property,Value,.) creates a new MATLAB_INTELLIGENTTRAIN or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before Matlab_intelligenttrain_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to Matlab_intelligenttrain_OpeningFcn via varargin. % % *See GUI Options on GUIDEs Tools menu. Choose “GUI allows only one 通信建模与仿真课程设计文档 第 23 页 % instance to run (singleton)“. % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help Matlab_intelligenttrain % Last Modified by GUIDE v2.5 26-Jun-2015 01:04:38 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, Matlab_intelligenttrain_OpeningFcn, . gui_OutputFcn, Matlab_intelligenttrain_OutputFcn, . gui_LayoutFcn, , . gui_Callback, ); if nargin 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 Matlab_intelligenttrain is made visible. function Matlab_intelligenttrain_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 Matlab_intelligenttrain (see VARARGIN) % Choose default command line output for Matlab_intelligenttrain handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes Matlab_intelligenttrain wait for user response (see UIRESUME) % uiwait(handles.figure1); % - Outputs from this function are returned to the command line. function varargout = Matlab_intelligenttrain_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 structure 通信建模与仿真课程设计文档 第 24 页 varargout1 = handles.output; % - Executes on button press in pushbutton10. function pushbutton10_Callback(hObject, eventdata, handles) % hObject handle to pushbutton10 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) info = imfinfo(.gif);% W = info.Width; H = info.Height; W = W(1); H = H(1); len = length(info); figure(NumberTitle, off, ToolBar, none, Menu, none); pos = get(gcf, position); set(gcf, position, pos(1) pos(2) W H); set(gca, position, 0 0 1 1); hold on; for i = 1 : len str=sprintf(photo%d.jpg,i); Ii, map = imread(.gif, frames, i); imwrite(Ii,str,jpg); F(:, i) = im2frame(flipud(Ii), map); end movie(F, 20,2); % - Executes on button press in pushbutton11. function pushbutton11_Callback(hObject, eventdata, handles) % hObject handle to pushbutton11 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) info = imfinfo(.gif);% W = info.Width; H = info.Height; W = W(1); H = H(1); len = length(info); figure(NumberTitle, off, ToolBar, none, Menu, none); pos = get(gcf, position); set(gcf, position, pos(1) pos(2) W H); set(gca, position, 0 0 1 1); hold on; for i = 1 : len str=sprintf(photo%d.jpg,i); Ii, map = imread(.gif, frames, i); imwrite(Ii,str,jpg); F(:, i) = im2frame(flipud(Ii), map); end movie(F, 20,2); 通信建模与仿真课程设计文档 第 25 页 % - Executes on button press in pushbutton12. function pushbutton12_Callback(hObject, eventdata, handles) % hObject handle to pushbutton12 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) info = imfinfo(.gif);% W = info.Width; H = info.Height; W = W(1); H = H(1); len = length(info); figure(NumberTitle, off, ToolBar, none, Menu, none); pos = get(gcf, position); set(gcf, position, pos(1) pos(2) W H); set(gca, position, 0 0 1 1); hold on; for i = 1 : len str=sprintf(photo%d.jpg,i); Ii, map = imread(.gif, frames, i); imwrite(Ii,str,jpg); F(:, i) = im2frame(flipud(Ii), map); end movie(F, 20,2); % - Executes on button press in pushbutton13. function pushbutton13_Callback(hObject, eventdata, handles) % hObject handle to pushbutton13 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) info = imfinfo(.gif);% W = info.Width; H = info.Height; W = W(1); H = H(1); len = length(info); figure(NumberTitle, off, ToolBar, none, Menu, none); pos = get(gcf, position); set(gcf, position, pos(1) pos(2) W H); set(gca, position, 0 0 1 1); hold on; for i = 1 : len str=sprintf(photo%d.jpg,i); Ii, map = imread(.gif, frames, i); imwrite(Ii,str,jpg); F(:, i) = im2frame(flipud(Ii), map); end movie(F, 20,2); % - Executes on button press in pushbutton14. 通信建模与仿真课程设计文档 第 26 页 function pushbutton14_Callback(hObject, eventdata, handles) % hObject handle to pushbutton14 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) info = imfinfo(.gif);% W = info.Width; H = info.Height; W = W(1); H = H(1); len = length(info); figure(NumberTitle, off, ToolBar, none, Menu, none); pos = get(gcf, position); set(gcf, position, pos(1) pos(2) W H); set(gca, position, 0 0 1 1); hold on; for i = 1 : len str=sprintf(photo%d.jpg,i); Ii, map = imread(.gif, frames, i); imwrite(Ii,str,jpg); F(:, i) = im2frame(flipud(Ii), map); end movie(F, 20,2); % - Executes on button press in pushbutton15. function pushbutton15_Callback(hObject, eventdata, handles) % hObject handle to pushbutton15 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) info = imfinfo(.gif);% W = info.Width; H = info.Height; W = W(1); H = H(1); len = length(info); figure(NumberTitle, off, ToolBar, none, Menu, none); pos = get(gcf, position); set(gcf, position, pos(1) pos(2) W H); set(gca, position, 0 0 1 1); hold on; for i = 1 : len str=sprintf(photo%d.jpg,i); Ii, map = imread(.gif, frames, i); imwrite(Ii,s

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论