Lecture 2 - E7 Spring 2010:Lecture 2 Raja Sengupta College...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: E7 Spring 2010 :Lecture 2 Raja Sengupta College of Engineering University of California, Berkeley Textbook Sections • 1.1, 1.2, 1.3, 1.5, 1.6 (relational operators only) • 2.1, 2.2, 2.3, 2.4 • 3.1 Topics • What is a program? • How do we compute an elementary function? • What does it mean for an input argument to be of the right type for a function? • What is the type of a function? • What argument types does matlab have? • Programming non-elementary functions by composing elementary functions • Programming non-elementary functions by an algorithm – Variables – The assignment operator From lecture 1: Always do an E7 programming assignment this way • First convert the engineering problem into function that can be effectively calculated – The function should be written down using pen and paper in the language of mathematics • Then program the function – Translate the mathematical language into a programming language, i.e., the language understood by your computer. • Then run the program and test it to see if its outputs match those specified by the function. If they do, compute the function on the input data and submit your answers. If they do not……. From lecture 1: Always do an E7 programming assignment this way • First convert the engineering problem into function that can be effectively calculated – The function should be written down using pen and paper in the language of mathematics • Then program the function – Translate the mathematical language into a programming language, i.e., the language understood by your computer. • Then run the program and test it to see if its outputs match those specified by the function. If they do, compute the function on the input data and submit your answers. If they do not……. E7 Module 1. Midterm 1 Module1: How do we program a mathematical function in Matlab? • What is a program? – A program is a description of a mathematical function in a language understood by the computer – A program is a description of an algorithm to calculate a mathematical function in a language understood by the computer • E7 computer language – MATLAB Program: How do we describe a mathematical function to a computer?...
View Full Document

This note was uploaded on 02/09/2010 for the course ENGIN 7 taught by Professor Horowitz during the Spring '08 term at Berkeley.

Page1 / 28

Lecture 2 - E7 Spring 2010:Lecture 2 Raja Sengupta College...

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

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