8. (10 pts) The following Matlab code should yield an O(ha) finite difference derivative approximation at each point r.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

8. (10 pts) The following Matlab code should yield an O(ha) finite difference derivative approximation at each point r.

Post by answerhappygod »

8 10 Pts The Following Matlab Code Should Yield An O Ha Finite Difference Derivative Approximation At Each Point R 1
8 10 Pts The Following Matlab Code Should Yield An O Ha Finite Difference Derivative Approximation At Each Point R 1 (68.88 KiB) Viewed 34 times
8. (10 pts) The following Matlab code should yield an O(ha) finite difference derivative approximation at each point r. The given data input for the function is z, y where a contains the r-values of the data and y contains the y-values of the data. For each step in the loop use the most appropriate O(ha) finite difference formula assuming the c-data values are equally spaced. Fill in the blanks function Cyprime] = FiniteDifference0h2(x,y) %x is the x-data vector, assume the x values are equally spaced. %y is the y-data vector if (length(y) *= length(x)) error('data vectors must be the same length') end n = length(y); yprime = zeros(1,n); h = = for i=1:n if i==1 yprime(__) elseif i==n yprime(__) else yprime() end end end
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply