Sale!

MATH/COSC 303 Assignment 2 solved

Original price was: $30.00.Current price is: $25.00. $21.25

Category:

Description

5/5 - (2 votes)

4. Lindfield and Penny, questions 1.1, 1.2, and 1.14.
5. Let
x =




1
2
3
4




y =




−4
−3
−2
−1




A =


2 6 −2 −6
0 6 0 −6
2 0 −2 0

 and B =




−1 −1 −1
2 2 2
−3 −3 −3
4 4 4




.
Use MATLAB to compute the following.
a) 63x − 17y
b) x · (63x − 17y)
c) 8(A> − 5B)
d) B ∗ 8(A> − 5B)
>
e) [B ∗ 8(A> − 5B)
>][63x − 17y]
6. Write a MATLAB script to create an upper triangular matrix based on your student number
as follows
SID = [a1, a2, …a8]
A =







a1 a2 . . . a8
0 a2 . . . a8
0 0 . . . a8
.
.
.
.
.
.
.
.
.
.
.
.
0 0 . . . a8







Write a MATLAB script to solve Ax = ones(8, 1) via backwards substitution.
7. Write a MATLAB script to perform an LU decomposition on a n × n matrix.
a) Use the tic and toc commands in MATLAB to time the script decomposing matrices
of the form rand(1, 1), rand(2, 2), rand(3, 3), …, rand(10, 10). Decompose 10 matrices of
each form.
b) Use a scatter plot (MATLAB command scatter) to display dimension versus time using
the data found in part (a).
Page 2 MATH/COSC 303