Question: 1- Given a Matrix A (to be provided) with elements dij . Let B be the output matrix with each bij is the sum of


1- Given a Matrix A (to be provided) with elements dij . Let B be the output matrix with each bij is the sum of the surrounded elements to ajj (horizontally and vertically) from A. i.e. bij + dij-1 = di-11 di+1; + + dij+1 Write a MATLAB function (call it detsum) to construct B and then to evaluate the determent of B. [1 2 31 6 9 8 For example if A = 4 5 6 then detsum (A) = B = 13 20 17 17 8 9 112 21 14] 2- Let x be this vector [0.0001 0.0005 0.001 0.005 0.01 .05 0.1] and f(x) = et, g(x) = cosx and h(x) = Use the following Taylor expansions (approximations) to approximate f(x), g(x) and h(x) at x: x3 ex 1 + x + + 2! 3!' x x2 COS X 1- + 2! 4!' 21+ x + x2 + x3 + x4. 01 Now by using MATLAB, find the relative error for each approximation and then plot the vector x versus the vector of each relative error using the function LOGLOG. (in one Figure)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
