{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CS 107

# CS 107 - CS 107 Textbooks Matlab Int roduction to...

This preview shows pages 1–2. Sign up to view the full content.

1/18/11 CS 107 Textbooks: Introduction to Scientific Computation and Programming by Daniel T Kaplan, Brooks/Cole Matlab A programming language A library of programs and pieces An Interactive Development Environment (IDE) o A program that helps you build and test programs Variables String: use single quotes A character can be a variable or can be a character itself. Equality: symbolized by == So 10==1 returns 0 which means false Getting help help something Lecture 03: Functions An assignment statement is not an equation Grammatical Structure An assignment statement has parts Cost = nontaxable + taxable .* 1.065 Functions Suppose you want to calculate area of a circle whose radius is 4 In command window, type pi.*4.^2 For the area of many circles, we want to create a function so that we don’t have to write a bunch of equations We’d rather do circleArea(4), etc. Ex

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

CS 107 - CS 107 Textbooks Matlab Int roduction to...

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

View Full Document
Ask a homework question - tutors are online