MATLAB Programming Lecture_第1页
MATLAB Programming Lecture_第2页
MATLAB Programming Lecture_第3页
MATLAB Programming Lecture_第4页
MATLAB Programming Lecture_第5页
已阅读5页,还剩32页未读 继续免费阅读

下载本文档

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

文档简介

1、MATLAB ProgrammingLecture 1Yu, J Tel: 62794070Office: Room 904# of Liuqing BuildingDepartment of Engineering PhysicsTsinghua UniversityCopyright 2010Contents Who am I? What is MATLAB? Why should I learn MATLAB? How to learn MATLAB? Introduction to the Final project. Introduction of the MATLAB Enviro

2、nmentWho am I?Jiyang Yu, (俞冀阳,浙江东阳人俞冀阳,浙江东阳人) 清华大学工程物理系 本科 1989-1994 核能及热能利用 清华大学工程物理系 博士 1994-1999 核能科学与工程工作经历 1999年-2004年,清华大学工程物理系,讲师 2004年-2008年,清华大学工程物理系,副教授 2008年-2009年,UC Berkeley USA,高级访问学者 2009年-至今, 清华大学工程物理系,副教授FTP Resources FTP Address: 2 Port: 21 User: matlab Password: 2010Pl

3、ease create a directory inside the directory of MATLAB大作业 based on your student number and your name in Chinese.For example: 1999990060俞冀阳What is MATLAB? MATLAB is a kind of language. A language is a system of signs (indices, icons, symbols) for encoding and decoding information. What is MATLAB? MAT

4、LAB is a kind of programming language A programming language is an artificial language designed to express orders that can be performed by a machine, particularly a computer. How many programming languages we have today? 92+Programming languagesActionScript Ada ALGOL APL Assembly AutoHotkey AutoIt B

5、ASIC BeanShell BLISS BlitzMax Boo C (C+,C#) Caml Clean Clojure CLU COBOL Cobra ColdFusion Comal Curl D Dylan Delphi Eiffel Erlang Euphoria Factor FP F# Forth Fortran Gambas GameMaker Go GraphTalk Groovy Harbour Haskell HyperNext Io J JADE Java Joy LabVIEW Lisp Lua Mathematica MATLAB ML Modula Mythry

6、l Oberon Occam Oxygene Oz Pascal Pawn Perl PHP PL/I Prolog Python REBOL RPG Ruby S Scala Scheme Simula Smalltalk SNOBOLTcl TDL PowerShell XL Why should I learn MATLAB? From MATrix LABoratory Language for Engineers Ease of Use Platform Independence Predefined Functions Graphical User Interface MATLAB

7、 Compiler来自学生的反馈蒋勇蒋勇 对MATLAB工具软件有了初步的认识。总体上感觉有不少与其他语言的相通之处,但,MATLAB本身有着其自身的一些特点。MATLAB基本数据结构是矩阵。其有着强大的数值计算和图形处理能力。语法比较的简单,易懂易学。但若要全面细致的掌握应该还需要下一番苦功夫。来自学生的反馈刘雅清刘雅清 我c语言学的不好,在刚学习matlab时,还是有些迷茫的_,不过后来通过大量的练习、摸索,终于独立的编完了一个程序,看到它可以运行的时候,真是高兴的_来自学生的反馈李天涯李天涯 这应该是我学C语言之后的再一次学习计算机语言,学习C语言的时候就觉得计算机的语言很厉害,把Mat

8、lab与C语言对照起来学习会发现很多相似之处,当然也会有很多不同之处。在Matlab的学习中,让我更加深刻的理解了一下矩阵,把矩阵作为一个数(一个整体)来计算的快乐。来自学生的反馈钟亮钟亮 MATLAB实验是一门比较特别的课程,除了老师的引导入门和部分解释外,很多东西都要靠自己去摸索和学习。在编程的过程中我遇到了很多问题,一般情况下我都是通过上网搜索来解决这些问题的,在网上的论坛中有很多类似的问题。我觉得这样增强了自己解决问题的能力,也节省了时间。How to learn MATLAB? How to learn English? Grammar, Vocabulary Reading, Wr

9、iting, Practising How to learn MATLAB? Syntax, Keywords, functions Practising by ProjectMaterials Text Stephen J. Chapman. MATLAB Programming for Engineers, Second Edition, Brooks/Cole, 2002. References MATLAB编程(英文影印版),科学出版社2003 邢树军,郑碧波 译. MATLAB 编程(第二版) 孙祥,徐流美,吴清 编著.MATLAB 7.0基础教程. 北京:清华大学出版社. 2005

10、 InternetFinal Project Given any two state properties Pressure, temperature, enthalpy, Get thermodynamic properties of water Enthalpy Entropy Density Heat Capacity What is water? Water is a chemical substance that is composed of hydrogen and oxygen and is vital for all known forms of life. Water in

11、three states: liquid, solid (ice), and (invisible) water vapor in the air. Whats the function of water in nuclear engineering? Coolant A coolant is a fluid which flows through a device to prevent its overheating, transferring the heat produced by the device to other devices that use it. Moderator In

12、 nuclear engineering, a neutron moderator is a medium which reduces the speed of fast neutrons, thereby turning them into thermal neutrons capable of sustaining a nuclear chain reaction.Thermodynamic properties Pressure Pressure is a measure of the force exerted per unit area on the boundaries of a

13、substance. Temperature Temperature is a measure of the molecular activity of a substance. Density The density of a substance is the total mass of that substance divided by the total volume occupied by that substance. Mass per unit volume.The International Association for the Properties of Water and

14、Steam (IAPWS) This release has been authorized by the IAPWS at its meeting in Erlangen, Germany, 14-20 September 1997. The members of IAPWS are Argentina, Canada, the Czech Republic, Denmark, Germany, France, Italy, Japan, Russia, the United Kingdom, and the United States of America. The formulation

15、 provided in this release is recommended for industrial use, and is called IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam The IAPWS-IF97 replaces the previous industrial formulation The 1967 IFC-Formulation for Industrial Use“ (IFC-67)The International Associat

16、ion for the Properties of Water and Steam (IAPWS) IAPWS also has a formulation intended for general and scientific use that has been released in 1996. This formulation provides the most accurate representation of the thermodynamic properties of the fluid phases of water substance over a wide range o

17、f conditions available at the time this release was prepared.Environments of MATLABThe MATLAB Environment The MATLAB Desktop The Command Window The Command History Window The Launch Pad - Start The Edit/Debug Window Figure Windows The MATLAB Workspace The Workspace Browser The MATLAB Search PathArra

18、nging the Desk These are some common ways to customize the desktop: Show or hide desktop tools via the Desktop menu. Resize any tool by dragging one of its edges. Move a tool outside of the desktop by clicking the undock button in the tools title bar. Reposition a tool within the desktop by dragging

19、 its title bar to the new location. Tools can occupy the same position, as shown for the Current Directory and Workspace browser in the preceding illustration, in which case, you access a tool via its tab. Change fonts and other options by using File - Preferences. Command Window Use the Command Win

20、dow to enter variables and to run functions and M-file scripts.Command History Statements you enter in the Command Window are logged in the Command History. From the Command History, you can view previously run statements, as well as copy and execute selected statements. You can also create an M-fil

21、e from selected statements.How to get help in MATLAB? Help Browser. help xxx Searches for an exact function name match. lookfor xxx Searches the quick summary information in each function for a match. Question: Whats the meaning of function here?Help Browser Use the Help browser to search for and vi

22、ew documentation and demos.The Help browser is an HTML viewer integrated into the MATLAB desktop.Current Directory Browser and Search Path MATLAB file operations use the current directory and the search path as reference points. Any file you want to run must either be in the current directory or on

23、the search path.Workspace Browser and Array Editor The MATLAB workspace consists of the set of variables (named arrays) built up during a MATLAB session and stored in memory. You add variables to the workspace by using functions, running M-files, and loading saved workspaces.Save and load Save and l

24、oad can be used to write data to disk and load data from disk It is not recommended that use save and load function to transfer data between functions since the speed of writing data to disk is slow compared with memory. Before using save and load, you must be clear what will be saved and what will

25、be loaded.Editor/Debugger Use the Editor/Debugger to create and debug M-files, which are programs you write to run MATLAB functions. The Editor/Debugger provides a graphical user interface for text editing, as well as for M-file debugging. To create or edit an M-file use File - New or File - Open, or use the edit function.M-Lint Code Check and Profiler Reports MATLA

温馨提示

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

评论

0/150

提交评论