Matlab程序设计与提高.ppt

上传人:小飞机 文档编号:5439224 上传时间:2023-07-07 格式:PPT 页数:27 大小:230.99KB
返回 下载 相关 举报
Matlab程序设计与提高.ppt_第1页
第1页 / 共27页
Matlab程序设计与提高.ppt_第2页
第2页 / 共27页
Matlab程序设计与提高.ppt_第3页
第3页 / 共27页
Matlab程序设计与提高.ppt_第4页
第4页 / 共27页
Matlab程序设计与提高.ppt_第5页
第5页 / 共27页
点击查看更多>>
资源描述

《Matlab程序设计与提高.ppt》由会员分享,可在线阅读,更多相关《Matlab程序设计与提高.ppt(27页珍藏版)》请在三一办公上搜索。

1、入门与提高,MATLABThe Language of Technical Computing,一、Matlab是什么,三、开发环境,二、安装,四、演示,五、学习中需注意的问题,Matlab是一门高性能的科学计算语言.她拥有友好的操作界面,并且采用了人们常用的数学表达方式,集成计算、可视化和程序设计等功能。,一、Matlab是什么,Math and computation Algorithm development Data acquisition Modeling,simulation,and prototyping Data analysis,exploration,and visuali

2、zation Scientific and engineering graphics Application development,including graphical user interface building,具有下面几个方面的应用:,Matlab是一个交互式的系统,其基本数据元素是不要求维数的矩阵。她可以用来求解很多的计算问题,特别是使用向量和矩阵的大型计算问题,在过去这些都是需要非交互式的标量语言(例C、Fortran)编写程序的。Matlab意指matrix laboratory。其起源是用来访问矩阵的LINPACK 和EISPACK子程序库。MATLAB以一个附加产品的形式

3、为特色具体应用的解决办法叫做工具箱。对MATLAB的大多数用户非常重要,工具箱允许你学习并且使用专业化的技术。工具箱综合延长MATLAB环境解决问题的特别的班级的MATLAB函数(M 文件)的收集。工具箱可提供的地区包括信号处理,控制系统,神经网络,模糊逻辑,子波,模拟和很多其它,Matlab系统由五部分构成:Development Environment.The MATLAB Mathematical Function Library.The MATLAB Language.Graphics.The MATLAB Application Program Interface(API).,Mat

4、lab系统,二、安装,1、系统要求,Windows For Release 14,the next major release,Windows 98 and ME versions of the Windows operating system will no longer be available.See Planned Release 14 System Requirements for details.,2、Standard Installation ChecklistStep 1:Start the InstallerStep 2:Enter Your Personal License

5、 Password(PLP)Step 3:Review the Software Licensing AgreementStep 4:Enter Your Name and Company NameStep 5:Select the Products You Want to InstallStep 6:Get Configuration Information(Optional)Step 7:Complete the Installation,3、MATLAB Installation Directory StructureAfter installation,your MATLAB inst

6、allation directory contains A text file,named license.txt,which contains the MATLAB software license agreement A shortcut to the MATLAB executable The subdirectories listed below,BINWIN32 The MATLAB binary and associated filesDEMOS MATLAB demonstration programsEXTERN Tools for building external inte

7、rfaces to MATLABFLEXLM The FLEXlm license manager,license management utilitiesHELP Help systemJA MATLAB internationalization filesJAVA MATLAB Java Jar filesNOTEBOOK MATLAB NotebookSYS Tools and operating system libraries that MATLAB depends onTOOLBOX The MATLAB toolboxesUNINSTALL The MATLAB Uninstal

8、ler programWORK Default initial current directory,三、开发环境,1、启动和关闭MATLAB,2、使用桌面,3、运行Matlab函数,4、获取帮助,使用桌面,Command window(命令)窗口Command History(命令历史)窗口Launch Pad(发射台)窗口Current Directoy(当前日录)浏览器Help(帮助)浏览器Workspace(工作空间)浏览器ArrayEditor(数组编辑器)窗口Editor/Debugger(编辑器/调试器),运行Matlab函数,在Command窗口看到提示符后就可以输入你想运行的任

9、何函数或变量运算。,书写规范,1、大小写敏感,2、一行书写多条命令用;分开,3、续行通过完成,4、不同的语法关键词显示颜色不同,5、Command Line Editing,Cut,Copy,Paste,Undo,and Redo,Recalling Previous Lines,6、清除屏幕可以用 clc,home,7、如果一次不想显示运行结果可以通过加;来完成,8、format输出数据格式显示控制命令。其中可以选择short、short e、long、long e等类型,运行程序(Running Programs),1、运行M文件Running M-Files,2、中止M文件运行,运行包含

10、Matlab语言,M文件和运行函数一样,在命令窗口中输入M文件名。但要求M文件必须在Matlab的搜索路径里面。,You can interrupt a running program by pressing Ctrl+C or Ctrl+Break at any time.,3、运行外部程序,可以通过!命令 或 dos(命令)来运行操作系统的程序,4、打开M文件,a、可以通过 File-Open,b、Use open or edit to open a file in the Editor.Use type to display the M-file in the Command Windo

11、w.,5、错误检验,Preferences for the Command Window,Command History,docDisplay online documentation in MATLAB Help browserhelpDisplay help for MATLAB functions in Command WindowhelpbrowserDisplay Help browser for access to extensive online helphelpwinDisplay M-file help,with access to M-file help for all f

12、unctions,4、获取帮助,infoDisplay information about The MathWorks or productslookforSearch for specified keyword in all help entriessupportOpen MathWorks Technical Support Web pagewebPoint Help browser or Web browser to file or Web sitewhatsnewDisplay information about MATLAB and toolbox releases,四、演示,1、例11 微积分运算举例。求函数f(x)=的原函数、定积分的精确解与数值解,导数。,(1)求原函数:syms x;sy=int(1/(1-x2)(1/2)(2)定积分的精确解。,z=int(1/(1-x2)(1/2),0,0.5)(3)求函数的导数。syms x;df=diff(1/(1-x.2)(1/2)df1=subs(df,0.5)numeric(df1),

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

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号