This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Engineering 7: Prof. Alexandre Bayen Introduction to Programming for Engineers Spring 2011 Lab 0: Introduction to E7 Date Assigned: 5:00pm, Friday  Jan 21. Date Due: Problem 19 due by end of first week lab. Problem 10 due 5:00pm, Friday  Jan 28. Problem 1: Get to know the computers (5pts) Write down your lab section number, the username to login to the lab computers, and the password. Keep these in your possession for references throughout the semester. We will distribute your midterm exams in labs so you will have to properly identify your lab section to get your midterms back on time. Login to a computer. Lab Section: _________________________________ Username: _________________________________ Password: _________________________________ Problem 2: Get to know your GSIs (5pts) Write down the names of your lab GSI’s and one interesting fact about them. Note that your lab section will probably have two GSIs but can have up to four. Pick any two GSIs to identify. GSI 1: ________________________________________ GSI 2: ________________________________________ Problem 3: Get to know your lab mates (5pts) Write the name, year, major, and one interesting fact about two people you do not know in your lab section. Person 1: Person 2: Engineering 7: Prof. Alexandre Bayen Introduction to Programming for Engineers Spring 2011 Problem 4: MATLAB as a calculator (5pts) Open MATLAB. Do the following calculations at the MATLAB command prompt. Write the answers in the spaces provided accurate to 16 digits . 4.1 e 2 sin( π /6) + log e (3) cos( π /9) – 5 3 = ____________________________________________________________________________. 4.2 Do Problem 1.14 in the course reader. Write down the approximation for π from the formula for n = 0 and n = 1. NOTE: The term (4k!) given in Ramanujan’s formula should read (4k)!. ____________________________________________________________________________. ____________________________________________________________________________. Problem 5: Logical and Comparison operators (5pts) Do the following logical and comparison operations at the MATLAB command prompt. Write the answers in the spaces provided. You may assume that P and Q are logical expressions. 5.1 For P = 1 and Q = 1: Compute NOT(P) AND NOT(Q). Write the result below. ____________________________________________________________________________. 5.2 For a = 10 and b = 25: Compute (a < b) AND (a == b) ____________________________________________________________________________....
View
Full
Document
This note was uploaded on 09/07/2011 for the course ENGIN 7 taught by Professor Horowitz during the Spring '08 term at Berkeley.
 Spring '08
 HOROWITZ

Click to edit the document details