23 - Data Structures
Motivation
A data structure is a complicated structure which stores information about many objects and the relationships between them. It is based on multi-field structures (which we saw in the previous chapter) and pointers to other

Assigned: October 21
Fall 2011
Due: October 28
E7 Laboratory Assignment 9
This assignment is on solving non-linear equations in Matlab and an introduction to Linear Algebra.
Note: You will use MATLABs publish command (accessible in the Editor window via F

E7 Introduction to Computer Programming
Spring Semester 2012
Lab Assignment #4
Due: Friday February 17
Lab 4: Iteration & Recursion
Problem 1: String Manipulation (15 points)
Write a function that takes a single-line character array InputString, and gener

Assigned: Sept 13
Fall 2013
Due: Sept 20
E7 Homework Assignment 2: Arrays and
Relational Operators
The rst part of this assignment will introduce you to one and two dimensional arrays in Matlab. The
second part of the assignment will introduce you to rela

E7 Assignment 9 Solutions
Summer 2010 Contents Problem 1 Problem 2 Problem 3 Problem 4 (a) (b) (c) (d) Problem 5 (a) (b) (c) Problem 6 Problem 7 Problem 8 Problem 9 (a) (b) Problem 10 Problem 11 (a) (b) (c) Problem 12 (a) (b) (c) (d) (i) (ii) (iii) (iv) (

Solutions Manual
to accompany
Applied Numerical Methods
With MATLAB for Engineers and Scientists
Steven C. Chapra Tufts University
CHAPTER 1
1.1 You are given the following differential equation with the initial condition, v(t = 0) = 0,
c dv = g - d v2 dt

8 - Recursion
Motivation
Recursion is one of the most powerful ways to solve problems with computers. It is also usually the simplest way to write programs. But it can be tricky to understand at first. This lecture will explain recursion and help you to t

9 - Trees
Motivation
Trees are a tool for representing hierarchies of information. They find many uses in computing, and are especially relevant for understanding recursive programming, which is why we introduce them here. What are trees good for? 1. Hier

10 - Recursion and Linear Recurrences
Motivation
Now that youve seen recursion in action, it is time to move on to some more interesting examples of it. These examples typically have more than one recursive call in the function. To understand such program

11 - Control Structures
In all the code weve looked at thus far, the computer has followed commands one by one. A control structure is a command which allows the computer to make a decision and act accordingly. Control structures fall in two categories: b

E7 Introduction to Computer Programming
Spring Semester 2012
Lab Assignment #3
Due: Friday February 10
Lab 3: More Functions & Branching
Note: Do not write functions that call other m-files you have written. If you want to call other functions you
have wr

E7 Introduction to Computer Programming
Spring Semester 2012
Lab Assignment #2
Due: Friday February 3
Lab 2: Data Structures & Functions
Problem 1: Get to know your lab mates (5 pts)
On the last page of this lab, write the name, year, major, and one inter

E7 Introduction to Computer Programming
Spring Semester 2012
Lab Assignment #1
Due: Friday January 27
Lab 1: Introduction & MATLAB Calculator
Problem 1: Using MATLAB as a Calculator (30 pts)
Define variables a = 2; b = 8; c = 6; x = 3. Provide one-line MA

Assigned: September 30, 2011
Fall 2011
Due: October 7, 2011
E7 Laboratory Assignment 6
The purpose of this lab is to produce an environment that will simulate the game Mastermind. See
the lecture slides for an explanation of the rules of the game. Weve pr

26 - Classes and Object Oriented Programming
Motivation
In the programming we have done so far, we have been performing what is known as functional programming. In this framework, we have focused our efforts (mostly) on writing functions with the understa

7 - Mathematical Induction
Mathematical induction is one of the most powerful and elegant tools in proving algebraic identities and other logical inferences. The abstract formulation of an inductive process is based on the following fundamental principle:

6 - Organizing Data
Motivation
So far, our data types have been rather simple: scalars, arrays and strings. We are now going to introduce an aggregate data type which is called a structure. The concept of structured programming is the first step toward ob

UNIVERSITY OF CALIFORNIA, BERKELEY Department of Civil and Environmental Engineering
Engineering 7 Spring 2009 Instructor: Professor Rector
Lab 00
Topics: Assigned: Due: Type: MatLab interface, basic commands Friday, 01/23/2009 Friday, 01/30/2009 at 2:00

UNIVERSITY OF CALIFORNIA, BERKELEY Department of Civil and Environmental Engineering
Engineering 7 Spring 2009 Instructor: Professor Rector
Lab 01
Topics: Assigned: Due: Type: Arrays, Matrices, Linear Algebra, and Basic Plotting Friday, 01/30/2009 Friday,

UNIVERSITY OF CALIFORNIA, BERKELEY Department of Civil and Environmental Engineering
Engineering 7 Spring 2009 Instructor: Professor Rector
Lab 02
Topics: Assigned: Due: Type: Functions, Switches, Conditionals Friday, 02/06/2009 Friday, 02/06/2009 at 12:0

UNIVERSITY OF CALIFORNIA, BERKELEY Department of Civil and Environmental Engineering
Engineering 7 Spring 2009 Instructor: Professor Rector
Lab 07 [20 pts]
Topics: Assigned: Due: Type: Data Structures (Cell Arrays, Structure Arrays) Monday, 03/16/2009 Mon

UNIVERSITY OF CALIFORNIA, BERKELEY Department of Civil and Environmental Engineering
Engineering 7 Spring 2009 Instructor: Professor Rector
Lab 04 Problems [20 pts total]
Topics: Assigned: Due: Type: Conditional, Loops, More Functions! Monday, 02/23/2009

UNIVERSITY OF CALIFORNIA, BERKELEY Department of Civil and Environmental Engineering
Engineering 7 Spring 2009 Instructor: Professor Rector
Lab 09 [15 pts]
Topics: Assigned: Due: Type: Linear Equations Monday, 4/13/2009, 8:00 am Monday, 4/20/2009, 12:00 p

UNIVERSITY OF CALIFORNIA, BERKELEY Department of Civil and Environmental Engineering
Engineering 7 Spring 2009 Instructor: Professor Rector
Lab 11 [20 pts total]
Topics: Assigned: Due: Type: Root finding, Function Handles Monday, 04/20/2009 Monday, 04/27/

UNIVERSITY OF CALIFORNIA, BERKELEY Department of Civil and Environmental Engineering
Engineering 7 Spring 2009 Instructor: Professor Rector
Lab 11 [15 pts]
Topics: Assigned: Due: Type: Interpolation Monday, 04/27/2009, 12:00 am Friday, 05/04/2009, 5:00 pm

UNIVERSITY OF CALIFORNIA, BERKELEY Department of Civil and Environmental Engineering
Engineering 7 Spring 2009 Instructor: Professor Rector
Lab 12 [20 pts]
Topics: Assigned: Due: Type: Regression Monday, 05/04/2009, 12:00 AM Friday, 05/08/2009, 5:00 PM Ta

1 - Introduction
Here we discuss computers and programming in a simple, introductory fashion. The objective is to describe how a computer works how a program operates some techniques for designing a program. We will start by defining some terms. A program

2 - MATLAB Basics
This chapter discusses some basic features of MATLAB programming, including 1. Arithmetic operations 2. Variable assignment 3. Arrays
MATLAB as a calculator
MATLAB is an interpreter. That means you can type text to it and receive output

Assigned: September 23
Fall 2016
Due: September 30
E7 Homework Assignment 4: Functions
The purpose of this lab is to introduce the concepts and syntax of writing functions in MATLAB.
Note: Use the template provided (HW4 Template.m) in the assignment downl

Assigned: Sept 9
Fall 2016
Due: Sept 16
E7 Homework Assignment 2: Arrays and
Relational Operators
The first part of this assignment will introduce you to one and two dimensional arrays in MATLAB.
The second part of the assignment will introduce you to rel

Assigned: Aug. 26
Fall 2016
Due: Sept. 2
E7 Homework Assignment 0: Autograder
Tutorial
The purpose of this lab is to introduce you to the MATLAB environment, the autograder, and the
logistics of generating your assignments and their respective scores whic

Assigned: September 30
Fall 2016
Due: October 7
E7 Homework Assignment 5: Cell and Struct
Arrays
The purpose of this lab is to introduce the concepts and syntax of writing functions in MATLAB.
Note: Use the template provided (HW5 Template.m) in the assign

Index
A
Accuracy
of forward difference formula, 247
in ODEs, 285
Ackermann function, 106
Addframe, 164
Addition
in binary, 125
in decimal, 124
of vectors, 179
Algebra, linear, 203
Analytics, 233
AND, 10
in binary, 125
Angles between vectors, 180
Animation