22栋学生公寓第二次开展心理健康教育  ._第1页
22栋学生公寓第二次开展心理健康教育  ._第2页
22栋学生公寓第二次开展心理健康教育  ._第3页
22栋学生公寓第二次开展心理健康教育  ._第4页
22栋学生公寓第二次开展心理健康教育  ._第5页
已阅读5页,还剩20页未读 继续免费阅读

下载本文档

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

文档简介

Introduction to MATLAB Week 13 4/21/09 Instructor: Kate Musgrave Time: Tuesdays 3-5pm Office Hours: Tuesdays 1:30-3pm Email: Website: /gradprog/ programming/ Syllabus Week 13: T 4/21 Intro to MATLAB MATLAB GUI Variables Operations Week 14: T 4/28 Functions and scripts Programming style Comments Flow control File I/O Week 15: T 5/5 Graphics Plot types Figure window Figure properties Figures: special topics Week 16: T 5/12 MATLAB toolboxes Statistics Signal processing Special topics What is MATLAB? MATLAB stands for MATrix LABoratory As such, it is optimized for matrix manipulation MATLAB is useful for visualization and data analysis MATLAB is versatile, designed to work the same across platforms and to interface with multiple programming languages MATLAB is expandable with toolboxes Starting MATLAB Type matlab into a terminal window Double-click matlab icon in windows env Troubleshooting: license file Check for connection to internet and vpn Check for updated license file Keep trying over time if too many connections detected, problem will fix itself eventually MATLAB Environment The MATLAB environment is designed to run as a GUI (graphical user interface) There is also a text-only version of MATLAB, which generally occurs when logging in remotely with an improperly set X11 forwarding Some options in MATLAB require the GUI, though most can be run in text-only mode Text-only mode not recommended MATLAB GUI MATLAB GUI Current Directory MATLAB GUI Current Directory Setting the path: You need to set up what directory to save your files to Multiple options: directory commands, current directory path, current directory window Directory commands: pwd, cd, dir, ls, path, editpath, copyfile, mkdir When in doubt, check your path MATLAB GUI Command Window MATLAB GUI Workspace MATLAB GUI Variable Editor MATLAB GUI Command History MATLAB GUI Additional Windows Editor window Will discuss next week with scripts and functions Figure window Will discuss in two weeks with graphics MATLAB Help Three common ways to access: Type help topic at command line Select help from drop-down menus (opens help window) Mathworks website help, helpwin, helpdesk MATLAB help is very comprehensive MATLAB Resources Getting Started with MATLAB 7 (Pratap) Mastering MATLAB 7 Additional online resources A note of caution: methods that work in earlier versions of MATLAB do not necessarily work in later versions. Deprecated options are not obvious, so basically you just need to test them out. Generally dealing with objects (figures) has shown the most change. Variables Types Numeric Logical Strings and Character (discussed further with file I/O) Cell arrays and structures (discussed further with file I/O) Function handles (discussed further with graphics) Variables Names Must start with a letter Can contain any combination of letters, digits, and underscores Distinguishes between upper and lower case Dont use function names namelengthmax, which all var_name, isvarname Variables Names Special functions that are already defined, but can be overwritten (temporarily) pi, i, j, eps, realmin, realmax, Inf, NaN Operations + Addition - Subtraction * Multiplication / Division Power Matrix transpose () Specify order Order of Operations Standard order of operations is enforced in MATLAB Parentheses Exponentiation Multiplication and Division Addition and Subtraction When in doubt, add parentheses MATLAB can help you keep track of () Elementary functions abs sqrt exp sin Logical Operations &

温馨提示

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

评论

0/150

提交评论