Question: 1 ) Create a function to compute second derivative of a function using combination of Forward Finite Difference O ( h 2 ) , Backward
Create a function to compute second derivative of a function using combination of Forward Finite Difference OhBackward Finite Difference Oh and Centered Finite Difference Oh formulations as follows:
function yddnewx,newy myGradientyx
This function computes second derivative numerically
Input:
y vector of dependent variable function values
x vector of independent variable values
Output:
ydd numerical nd derivative
newx interpolated x values if needed
new interpolated y values if needed
a x and y must be equal size column vectors with at least data points in each
b Function determines the minimum difference Delta x from the input x vector
c Function uses interp to generate uniformly spaced x and y vectors with h Delta x
d Function uses forward difference
for the first data point, backward difference
for the last data
points, and centered difference
for the interior points.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
