Section the MATLAB scripts using the "%% Problem "x" for each problem. Comment as much as possible. For functions, make a separate .m file named the same name as the function. Write a script that runs the function and proves the function's capability, and that it works correctly to solve the problem required. Make sure to upload both the script file and the function file for your test.
Problem 3 (3 pts)
Write a user-defined MATLAB function that determines the dot product of two vectors. For the function name and arguments, use w = dotpro(u,v). The input arguments to the function are the two vectors, which can be two or three-dimensional. The output, w, is the result (a vector). Use the function dotpro for determining the dot product of vectors a = 3i + 11j and b = 14i - 7.3j, and vectors c = -6i + 14.2j + 3k and d = 6.3i - 8j - 5.6k.
(Answer) (a) = -38.3 (b) = -168.2