0% found this document useful (0 votes)
28 views

Problem Set 1

This document provides instructions for Problem Set 1 of the course CME 192: Introduction to MATLAB. It includes 4 problems involving matrix algebra, sequences, nested radicals, and numerical expressions. The problems define variables, perform calculations, and ask the student to display results in specific formats.

Uploaded by

Keanu Bellamy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Problem Set 1

This document provides instructions for Problem Set 1 of the course CME 192: Introduction to MATLAB. It includes 4 problems involving matrix algebra, sequences, nested radicals, and numerical expressions. The problems define variables, perform calculations, and ask the student to display results in specific formats.

Uploaded by

Keanu Bellamy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CME 192: Introduction to MATLAB

Problem Set 1: Matrix Algebra

1. Scripts

Define a sequence as a map from the set of positive integers to the set of real
numbers. A sequence is denoted {an } instead of a(n), so that we can think of
an as the nth element in an ordered set.
A sequence {an } is said to be periodic if there exists a positive integer k such
that an = an+k for all sufficiently large values of n. In this case, k is called the
period of {an }.
Suppose {an } is given by an = 5n for n > 0. Define {bn } to be a sequence in
which bn is the last 4 digits of an . Verify that {bn } is periodic and find its period.

2. Variables

A nested radical is a radical expression which contains another radical expression.



q q q
3 3 3
3 + 2, 1 5, 1+ 2+ 3
Expressions shown above are examples of a nested radical.
Define t to be the real number given by the following infinitely nested radical.
r

q
6 + 6 + 6 +

Note that t is positive. Verify numerically that t = 3 as described below.



(a) Define a variable t with an initial value of 6.

(b) Assign the value 6 + t to t.
(c) Repeat (b) until t approaches 3.
It is possible to compute t in closed form by noting that

t = 6 + t.
By squaring both sides and simplifying, we can write
t2 t 6 = (t 3)(t + 2) = 0,
which has roots at t = 2 and t = 3. Since t > 0, it must be that t = 3.

1
3. Numerical Expressions

Define real-valued variables x, y, and z as shown below.


x = 3.14 1012 , y = log3 , z = 2 csc 1
If a, b, and c are positive real numbers, the change of base for the logarithmic
function is given by
loga c
logb c = .
loga b
Evaluate each of the following expressions. Call help elfun for help topics on
elementary functions.
r
y
(a) u =
x2 + y 2 + z 2
z
y + zy

(b) v =
xz 4
3  2 
(c) w = arg ey sin1 z in degrees
2
In (c), the argument of a complex number , denoted arg , is the angle between
and the positive real axis on the complex plane as shown in Figure 1.

Figure 1: The complex plane.

Recall also that the angular units satisfy


180 = (radians).
Display your results in format short e.

4. Matrix Operations

Construct the following 4 9 matrix and carry out the calculations as described
below.
11 12 13 14 15 16 17 18 19
21 22 23 24 25 26 27 28 29
K= 31 32 33 34 35 36 37 38 39

41 42 43 44 45 46 47 48 49

2
Call help elmat and help matfun for help topics on elementary matrices and
matrix functions.
(a) Define a row vector V consisting of integers from 1 to 9 in ascending order.
(b) Construct the matrix K by concatenating copies of V shifted by multiples
of 10.
(c) Compute AB, where A and B, respectively, are submatrices of K corre-
sponding to its first four and last three columns.
(d) Construct a matrix L by appling the natural logarithm to the square of
every entry of AB.
(e) Define a column vector W in which its nth entry is the sum of all entries
in the nth row of L.
(f) Construct the matrix M of the form
 
W W W
.
W W W

Use the repmat function to replicate copies of matrix W .


(g) Compute 10M T M , where M T denotes the transpose matrix of M .
Display your results in format long g.

You might also like