Write a program to calculate and plot, MATLAB Programming

Assignment Help:

This problem is intended to demonstrate some problems that can arise from the finite precision of numerical calculations performed with computers.  We will do this by approximating the derivative of a function.  The definition of the derivative of the unction f(x) is:

944_Write a program to calculate and plot.png

We can approximate this with the computer by allowing ?x to be a finite number.  Thus, the numerical approximation to the derivative of the function can be determined from:

2218_Write a program to calculate and plot1.png

The error between the actual derivative and its approximation is dependent upon both x and ?x:

847_Write a program to calculate and plot2.png

Write a program to calculate and plot the error in the numerical estimate of the derivative according to equation (3), for the function

  (You may find the logspace command useful.)

Use logarithmic scales on both the x-axis and y-axis of your plot (you may find the MATLAB command loglog helpful).  Create a Microsoft Word document named homework8.doc and paste into it your plot of error vs. ?x.   Also in your MS Word document, comment on your results - especially relative to the behavior of the error as ?x increases.


Related Discussions:- Write a program to calculate and plot

Finite difference method, Finite Difference Method for An Elliptic Partial ...

Finite Difference Method for An Elliptic Partial Differential Equation   Problem  Use the finite difference method and MatLab code to solve the 2D steady-state heat equat

Option pricing, Barrier Option pricing in Matlab using MC simulation or fin...

Barrier Option pricing in Matlab using MC simulation or finite difference methods

Plot conour lines on the axes space , The following four 4 equations are ne...

The following four 4 equations are needed to be plotted as CONTOUR lines on the axes space (C, T) where C is the horizontal axis, and T is the vertical axis. Contour lines for

ANFIS, How to design a FIR filter using ANFIS in MATLAB

How to design a FIR filter using ANFIS in MATLAB

Phase equilibrium, Do you have expert who can solve chemical engineering th...

Do you have expert who can solve chemical engineering thermodynamics chemical equilibrium MATLAB coding?

Calling an user-defined function from script, Calling an User-Defined Funct...

Calling an User-Defined Function from Script: Now, we will change our script which prompts the user for the radius and computes the area of a circle, to call our function cal

Robot, How to simulate a robot

How to simulate a robot

Illustration of variable number of input arguments, Illustration of Variabl...

Illustration of Variable number of input arguments: In this situation, it was supposed that the radius will always be passed to the function. The function header can hence be

Writing data to a file, Writing data to a File: The save function can ...

Writing data to a File: The save function can be used to write a data from the matrix to the data file, or to append a data file. The format is as shown below: save filenam

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd