CS 107 - 1/18/11 CS 107 Textbooks: Matlab Int roduction to...

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

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

This document was uploaded on 01/25/2011.

Page1 / 3

CS 107 - 1/18/11 CS 107 Textbooks: Matlab Int roduction to...

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

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