ENGR131 Homework 1: Expressions, Variables, and Arrays
For basic questions, use the help email address. For help with your program, use the help center to send us your
file. In-person help on Homework #1 on Monday, September 3 from 6 PM to 8 PM in Leutner

Lab Assignment #3: for Loops
REQUIRED
Part A (written, 30 points): Due by the end of the lab period. Students must be present during lab to receive
credit. You may discuss questions with other students. Though not required, you are allowed to use a comput

ENGR131 Homework 2: I/O, Functions, and if statements
This assignment will not be collected. It is intended as practice for quizzes and exams. For basic questions, use the help
email address. For help with your program, use the help center to send us your

Tutorial #6: Cell Arrays
OPTIONAL
Enter all of the examples shown in section 8.1 of your textbook. Only section 8.1 (on cell arrays) is necessary
for this lab.
Lab #6: Cell Arrays
REQUIRED
Part A (written, 15 points): Due by the end of the lab period. Stu

TheforLoopSong
Example#1
Range:[123]
for i = 1:3
disp(i)
end
New
value?
i
Output
Musicfrom99bottles
Isthereanewrangevaluetouse?
Theanswertothatis
true.Assignittoiandprintitout.Loopbackup,ohthatswhatyoudo.
false.Jumptothelinethatsaftertheend.Thatswhatyoudo

Tutorial #3: Repetition with for statements
OPTIONAL
Introduction: In this tutorial, you will enter several forms of the for statement (loops). We will demonstrate
using the debugger to step through programs. The debugger was demonstrated in lecture but i

Quiz #2, Problem #1
Instructions: Write a function named solveQuadratic.m that returns one of the two roots of a quadratic
equation using the quadratic formula. It receives four arguments: a, b, c, and a fourth value of 1 or 2 that
indicates which of the

Lab #2: Input/Output and Functions
REQUIRED
Part A (written, 10 points): Due by the end of the lab period. Students must be present during lab to receive
credit. Use the following list of terms to complete the sentences below. You may discuss questions wi

Lab #1: Calculations, Variables, and Scripts
SOLUTIONS
1. (10 points) Briefly explain what an expression is.
ACCEPTABLE: mathematical operations. BETTER: combination of operators and operands.
2. (10 points) Briefly explain what a variable is.
ACCEPTABLE:

Lab #1: Calculations, Variables, and Scripts
REQUIRED
Part A (written, 50 points): Due by the end of the lab period. You must be present during lab to receive
credit. You may discuss questions with other students. Hand in your answers on a sheet of paper

Tutorial #1: Calculations, Variables, and Scripts
REQUIRED
Introduction
The tutorials are designed to help students transition to the lab assignments after reading the textbook. You will
find that your lab period will run more smoothly (and more quickly)

TheforLoopSong
Example#2
Range:[123]
sum = 0;
for i = 1:3
sum = sum + i;
end
disp(sum)
sum
Newvalue?
i
0
Musicfrom99bottles
Isthereanewrangevaluetouse?
Theanswertothatis
true.Assignittoiandaddittosum.Loopbackup,ohthatswhatyoudo.
false.Jumptothelinethatsaf

ENGR131 Homework 3: Loops
This assignment will not be collected. It is intended as practice for quizzes and exams. Demo versions of all programs are
provided. For basic questions, use the help email address. For help with your program, use the help center

Quiz #5
Solutions
Instructions (90 points): Write a modular program named password.m that asks for two passwords and compares
them. The main (primary) function should use the following two subfunctions to do all input/output and comparisons: (1)
Include o

Lab #5: The Function Family
REQUIRED
Part A (written, 10 points): Due by the end of the lab period. Students must be present during lab to receive
credit. For questions 1 5, use the following list of function headers and write the letter as your answer.
a

Quiz #4
(version A)
Problem #1 (45 points): Write a function named plotPower.m that receives a 2-D array of power values and
plots the mean (average) power used for three different times of the day. Assume that each row (1st dimension)
in the array contai

ENGR131 Homework 4: Array Operations
This assignment will not be collected. It is intended as practice for quizzes and exams. Demo versions of all programs are
provided. For basic questions, use the help email address. For help with your program, use the

Lab #4: Array Operations
Rubric for B1 corrected on Sep 29
REQUIRED
Part A (written, 30 points): Due by the end of the lab period. Students must be present during lab to receive
credit. Use the following list of terms to complete the sentences below. You

Problem #1:
a. (3 points) minimum:
rand: function or random number
*: operator or multiplication
number: variable
b. (7 points)
ans = 2
(2 points)
1 for ans, 1 for 2
c.
d.
e.
f.
g.
h.
i.
x=2
(2 points)
1 for x, 1 for 2
(2 points, -1 for each incorrect val

Exam Extra Credit
Revised September 26 after Chriss big email mistake
The Philosophy: Finding your own mistakes is essential for success in life. You will learn much more this way
instead of letting other people tell you what your mistakes are.
The Points

ENGR131 Final Project
One team member must submit the following:
Phase
Points
Choose partner
Proposal
Alpha Version
Presentation
0
10
20
extra:
10
30
40
Beta Version
Final Version
Submit (on Canvas) or Use Online Form
Due at midnight at end
of the day (ex