MIT6_094IAP10_lec01

MIT6_094IAP10_lec01 - 6.094 Introduction to Programming in...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
6.094 Introduction to Programming in MATLAB Danilo Š ć epanovi ć IAP 2010 Lecture 1: Variables, Scripts, and Operations
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Course Layout •Le c tu re s ¾ 1: Variables, Scripts and Operations ¾ 2: Visualization and Programming ¾ 3: Solving Equations, Fitting ¾ 4: Images, Animations, Advanced Methods ¾ 5: Optional: Symbolic Math, Simulink
Background image of page 2
Course Layout • Problem Sets / Office Hours ¾ One per day, should take about 3 hours to do ¾ Submit doc or pdf (include code, figures) ¾ No set office hours but available by email • Requirements for passing ¾ Attend all lectures ¾ Complete all problem sets (-, , +) • Prerequisites ¾ Basic familiarity with programming ¾ Basic linear algebra, differential equations, and probability
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Outline (1) Getting Started (2) Scripts (3) Making Variables (4) Manipulating Variables (5) Basic Plotting
Background image of page 4
Getting Started • To get MATLAB Student Version for yourself » https://msca.mit.edu/cgi-bin/matlab ¾ Use VPN client to enable off-campus access ¾ Note: MIT certificates are required • Open up MATLAB for Windows ¾ Through the START Menu • On Athena » add matlab » matlab &
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Command Window Current directory Workspace Command History Courtesy of The MathWorks, Inc. Used with permission.
Background image of page 6
Making Folders • Use folders to keep your programs organized • To make a new folder, click the ‘Browse’ button next to ‘Current Directory’ • Click the ‘Make New Folder’ button, and change the name of the folder. Do NOT use spaces in folder names. In the MATLAB folder, make two new folders: IAPMATLAB\day1 • Highlight the folder you just made and click ‘OK’ • The current directory is now the folder you just created • To see programs outside the current directory, they should be in the Path. Use File-> Set Path to add folders to the path
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Customization • File Æ Preferences ¾ Allows you personalize your MATLAB experience Courtesy of The MathWorks, Inc. Used with permission.
Background image of page 8
MATLAB Basics • MATLAB can be thought of as a super-powerful graphing calculator ¾ Remember the TI-83 from calculus? ¾ With many more buttons (built-in functions) • In addition it is a programming language ¾ MATLAB is an interpreted language, like Java ¾ Commands executed line by line
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Help/Docs help ¾ The most important function for learning MATLAB on your own • To get info on how to use a function: » help sin ¾ Help lists related functions at the bottom and links to the doc • To get a nicer version of help with examples and easy-to- read descriptions: » doc sin • To search for a function by specifying keywords: » doc + Search tab
Background image of page 10
Outline (1) Getting Started (2) Scripts (3) Making Variables (4) Manipulating Variables (5) Basic Plotting
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Scripts: Overview • Scripts are ¾ collection of commands executed in sequence ¾ written in the MATLAB editor ¾ saved as MATLAB files (.m extension) • To create an MATLAB file from command-line » edit helloWorld.m • or click Courtesy of The MathWorks, Inc. Used with permission.
Background image of page 12
Scripts: the Editor * Means that it's not saved Line numbers Comments MATLAB file
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/27/2011 for the course CS 1671 taught by Professor Smith during the Spring '11 term at Georgia Tech.

Page1 / 61

MIT6_094IAP10_lec01 - 6.094 Introduction to Programming in...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online