Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

please answer all parts Please label all plots and tables and include any MATLAB scripts and functions with your solution. 1. The following finite difference

please answer all parts image text in transcribed
Please label all plots and tables and include any MATLAB scripts and functions with your solution. 1. The following finite difference quotient f(a+h)-f(1) h is a one-sided formula which approximates the derivative f'(x) of a differentiable function f(x). Write a MATLAB function, with calling sequence (fp for f prime) fp - onesidediff(f,x,h). which evaluate this quotient on a vector x, given a scalar h and a general function f passed using the @ notation. Use this MATLAB function to approximately compute the derivative of f(x) = exp(sin x) on 0.28), using * - linspace(0,2pi, 100) and h - 1e-4. Prepare the following plot with two subplots, using the subplot(2,1,1) and subplot (2,1,2) commands. The top plot should depict the function on (0,2x), and the bottom plot the error (in absolute value) between the one-sided approximation and exact derivative on (0,2)

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

More Books

Students explore these related Databases questions