Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with this question by using matlab to successfully run it.Plase add the comments Thank you for your help 1. [40 Points Write

Please help me with this question by using matlab to successfully run it.Plase add the comments Thank you for your help

image text in transcribed

1. [40 Points Write a script that determines the first and second derivatives of a function that is given by a set of discrete points with equal spacing. The input arguments are vectors with the coordinates of the points, and the output arguments are vectors with the values of the first and second derivatives, respectively, at each point. For calculating both derivatives, the function should use the finite difference formulas that have a truncation error of O(h?). The script should also produce a plot of a function, and both of the derivatives. Use the developed script for calculating the derivatives of the function that is given by the following set of points -0.5 1.5 -1 0.5 2.5 3.5 4.5 f(x) -3.632 -0.3935 1 0.6487 -1.282 -4.518 -8.611 -12.82 -15.91 -15.88 -9.402 9.017 Show finite difference approximations that you used (formulas) Plot function and both derivatives on three sub-plots

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions