lecture_14

lecture_14 - Lecture 14 Comp 116 Feb 18th 2009 Objectives...

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

View Full Document Right Arrow Icon
Click to edit Master subtitle style 10/6/09 Lecture 14 Comp 116 Feb 18th , 2009
Background image of page 1

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

View Full DocumentRight Arrow Icon
10/6/09 Objectives Functions control flow syntax scope functions variables purpose
Background image of page 2
10/6/09 Administrative stuff Check blackboard, especially the announcements section I use blackboard as a medium of communication.
Background image of page 3

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

View Full DocumentRight Arrow Icon
10/6/09 Functions - I
Background image of page 4
10/6/09 This far script files All code inside one big file maybe structured into cells used built-in matlab functions sin, cos, zeros etc. How do we structure our code? How do we write our own functions?
Background image of page 5

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

View Full DocumentRight Arrow Icon
10/6/09 function files edit filename or open from the menu system needs to be in the current directory or in the path
Background image of page 6
10/6/09 Interpreter What does MATLAB do? % MyScript.m x = [4 3 9 2 9 12 7 4]; maxX = max(x); ... ... max.m inpu t output
Background image of page 7

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

View Full DocumentRight Arrow Icon
10/6/09 Function Syntax what is syntax? Grammar Rules that let you write in the language Punctuations etc.
Background image of page 8
10/6/09 Function Syntax function keyword
Background image of page 9

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

View Full DocumentRight Arrow Icon
10/6/09 Function Syntax function name
Background image of page 10
10/6/09 Function Syntax function return value(s) or output
Background image of page 11

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

View Full DocumentRight Arrow Icon
10/6/09 Function Syntax function arguments or inputs
Background image of page 12
10/6/09 Function Syntax First block of comments searched by lookfor top block: help text
Background image of page 13

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

View Full DocumentRight Arrow Icon
10/6/09 Function Syntax Function implementation
Background image of page 14
Image of page 15
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/22/2009 for the course COMP 116 taught by Professor Stotts during the Spring '08 term at UNC.

Page1 / 32

lecture_14 - Lecture 14 Comp 116 Feb 18th 2009 Objectives...

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

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