欢迎来到冰点文库! | 帮助中心 分享价值,成长自我!
冰点文库
全部分类
  • 临时分类>
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • ImageVerifierCode 换一换
    首页 冰点文库 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    matlab课程教学设计简单计算器的设计.docx

    • 资源ID:12314294       资源大小:83.83KB        全文页数:14页
    • 资源格式: DOCX        下载积分:8金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要8金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    matlab课程教学设计简单计算器的设计.docx

    1、matlab课程教学设计简单计算器的设计matlab课程设计报告题 目简易计算器的设计学 院电子信息工程学院专 业电子信息学生姓名和学号指导教师一 、选题目的及意义 GUI的广泛应用是当今计算机发展的重大成就之一,它极大地方便了非专业用户的使用。人们从此不再需要死记硬背大量的命令,取而代之的是可以通过窗口、菜单、按键等方式来方便地进行操作,而在matlab有很简单的gui设计工具,我们可以通过这个工具轻松地构建我们想要的程序,从而实现与用户的信息交互。本次课程设计是使用了matlab中的guide生成了简单的计算器程序。 二、源代码function varargout = Calculator

    2、(varargin) %Simple Calculator%Anhui University % Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, Calculator_OpeningFcn, . gui_OutputFcn, Calculator_OutputFcn, . gui_LayoutFcn, , . gui_Callback, );if na

    3、rgin & 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 Calculator is made visible.function Calculator_Openin

    4、gFcn(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 Calculator (see VA

    5、RARGIN) % Choose default command line output for Calculatorhandles.output = hObject; % Update handles structureguidata(hObject, handles); % UIWAIT makes Calculator wait for user response (see UIRESUME)% uiwait(handles.figure1); % - Outputs from this function are returned to the command line.function

    6、 varargout = Calculator_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 comma

    7、nd line output from handles structurevarargout1 = handles.output; % - Executes on button press in p1.function p1_Callback(hObject, eventdata, handles)% hObject handle to p1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see

    8、 GUIDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,1);set(handles.text1,string,textstring) % - Executes on button press in p2.function p2_Callback(hObject, eventdata, handles)% hObject handle to p2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB%

    9、handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,2);set(handles.text1,string,textstring) % - Executes on button press in p3.function p3_Callback(hObject, eventdata, handles)% hObject handle to p3 (see GCBO)% eventdata reserve

    10、d - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,3);set(handles.text1,string,textstring) % - Executes on button press in p4.function p4_Callback(hObject, eventdata, handles)% h

    11、Object handle to p4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,4);set(handles.text1,string,textstring) % - Executes on button press in p5.fun

    12、ction p5_Callback(hObject, eventdata, handles)% hObject handle to p5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,5);set(handles.text1,string,t

    13、extstring) % - Executes on button press in p6.function p6_Callback(hObject, eventdata, handles)% hObject handle to p6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstrin

    14、g=strcat(textstring,6);set(handles.text1,string,textstring) % - Executes on button press in p7.function p7_Callback(hObject, eventdata, handles)% hObject handle to p7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDA

    15、TA)textstring=get(handles.text1,string);textstring=strcat(textstring,7);set(handles.text1,string,textstring) % - Executes on button press in p8.function p8_Callback(hObject, eventdata, handles)% hObject handle to p8 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handle

    16、s structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,8);set(handles.text1,string,textstring) % - Executes on button press in p9.function p9_Callback(hObject, eventdata, handles)% hObject handle to p9 (see GCBO)% eventdata reserved - to

    17、 be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,9);set(handles.text1,string,textstring) % - Executes on button press in add.function add_Callback(hObject, eventdata, handles)% hObje

    18、ct handle to add (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,+);set(handles.text1,string,textstring) % - Executes on button press in p0.functi

    19、on p0_Callback(hObject, eventdata, handles)% hObject handle to p0 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,0);set(handles.text1,string,text

    20、string) % - Executes on button press in sub.function sub_Callback(hObject, eventdata, handles)% hObject handle to sub (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstrin

    21、g=strcat(textstring,-);set(handles.text1,string,textstring) % - Executes on button press in div.function div_Callback(hObject, eventdata, handles)% hObject handle to div (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GU

    22、IDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,/);set(handles.text1,string,textstring) % - Executes on button press in mul.function mul_Callback(hObject, eventdata, handles)% hObject handle to mul (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB%

    23、handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,*);set(handles.text1,string,textstring) % - Executes on button press in denghao.function denghao_Callback(hObject, eventdata, handles)% hObject handle to denghao (see GCBO)% ev

    24、entdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=eval(textstring);set(handles.text1,string,textstring) % - Executes on button press in clear.function clear_Callback(hObject, event

    25、data, handles)% hObject handle to clear (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) set(handles.text1,string,0) % -function exit_Callback(hObject, eventdata, handles)% hObject handle to exit (see GCBO)% even

    26、tdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)close(gcf) % -function calculate_Callback(hObject, eventdata, handles)% hObject handle to calculate (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% ha

    27、ndles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=eval(textstring);set(handles.text1,string,textstring) % - Executes on button press in point.function point_Callback(hObject, eventdata, handles)% hObject handle to point (see GCBO)% eventdata rese

    28、rved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)textstring=get(handles.text1,string);textstring=strcat(textstring,.);set(handles.text1,string,textstring) 设计功能:1.可进行加减乘除四则运算2.可进行清零,退出等 三、界面设计及运行结果1-1. GUIDE 设计界面1-2.进入程序初始状态1-3.简单的实例测试五、心得及体会通过这次matlab课程设计,让我对matlab有了更深的了解。Matlab不仅给我们更方便的编程体验,其中强大的数值运算,信号处理等功能更是我们专业实现相关系统设计的好工具。


    注意事项

    本文(matlab课程教学设计简单计算器的设计.docx)为本站会员主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2023 冰点文库 网站版权所有

    经营许可证编号:鄂ICP备19020893号-2


    收起
    展开