Question: Construct an function handle stored under the name f that has has its value the function f ( x , y ) = e 3

Construct an function handle stored under the name f that has has its value the
function f(x, y)= e
3(x2+(y/2)2)+ cos(xy). Be sure that your function handle can
accept vectors as input, so that the call f(v,w) on a vectors v =[v1, v2,, vm]T
and w =[w1, w2,, wm]T produces the vector [f(v1, w1), f(v2, w2),, f(vm, wm)]T
.
(b) Using v =
1
5
0
3
and w =
3
/4
1
0
, compute s = f(v, w).
(c) Compute t = f(w, v).
(d) Create a 1100 row vector x = x1 x2 x100, where x consists of 100
equally-spaced points on the interval [3,3], with x1=3 and x100=3. Set
y = x.
(e) Create matrices X and Y that encode the coordinates for a 100100 grid of
equally-spaced points over the square [3,3][3,3] using your vectors x and y.
This can be done with MATLABs meshgrid command.
(f) Construct the matrix Z = f(X, Y ).(Note: If you want to look at Z as a surface,
you can use the surf(X,Y,Z) command. This is not required for the problem.)
(g) Set z to be a 10021 vector where the first 100 entries of z are the entries in the
first column of Z, the second 100 entries of z are the entries in the second column
of Z, and so on. This is ca

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 Programming Questions!