Question: a . For fun, verify the following properties numerically for any random square matrices A , B , and C of your own choice. Turn

a. For fun, verify the following properties numerically for any "random" square matrices A,B, and C of
your own choice. Turn in just one (and only one) Matlab output for each problem below:
i. If A is symmetric, the matrix D=AB is, in general, not symmetric, even if B is also symmetric.
ii. If A is symmetric, the matrix D=BTAB is always symmetric.
iii. If AB=CB, it does not necessarily follow that A=C.
iv. det(A)=j, where j is the j-th eigenvalue of A(use Matlab's help to learn how to use det,
prod, and eig).
v. The condition number of a matrix is given as A=||A||||A-1|| where |||| is a given matrix norm
(use Matlab's help to learn about the commands norm, cond, and inv).
b. Now, let's practice how to plot functions in Matlab by solving each of the exercises described below.
Here, you are asked to turn in a snippet of all the Matlab functions you used in addition to the figures
you generated by those pieces of code.
i. Use Matlab's 1 inespace function to create a vector x of 100 entries ranging from x=0 to x=
2 and use it to plot the function f(x)=sinx. Define f(x) by creating a handle to an anonymous
function (look for "Create Function Handle" in Matlab's help). Don't forget to label your x and y
axes using xlabel and ylabel. If you don't know how to plot a function in Matlab, look for
plot on Matlab's help.
ii. Use Matlab's meshgrid function to create a uniformly spaced grid of x and Y values, each ranging
from 0 to 4 and use Matlab's surf function to plot the surface f(x,y)=sinxsiny. As with
the previous problem, define f(x,y) using a function handle and don't forget to label your axes.
For this exercise, you should show the surface in two different ways: (a) using the default
surf(x,Y,Z) function, and (b) altering the appearance of the surface, such that the option
of the surface from part (b), use the command camlight after you plot the surface (search for
the terms surf and camlight on Matlab's help).
iii. Plot the contour lines of the Rosenbrock's function f(x,y)=100(y-x2)2+(1-x)2 and
evaluate Z=f(x,Y), where x and Y are obtained using the meshgrid function with x ranging
from -2 and 2 and Y ranging from -2 and 5(search for the cont our function on Matlab's help).
 a. For fun, verify the following properties numerically for any "random"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!