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

Appending data to a data file, Appending data to a data File: A text f...

Appending data to a data File: A text file once exists; the data can be appended to it. The format is similar as formerly, with the addition of the qualifier -append. For illu

Sopping function and upwind scheme, I am trying to implement this equation ...

I am trying to implement this equation u_t=-\u_x\ using upwind scheme. and as a second step, I need to put some stopping function g(h) where u_t=-g(h)\u_x\ how can I write this on

Plot the input and the output of the filter on a single plot, An FIR filter...

An FIR filter has coefficients b = [ 1.0000   -0.6387    1.0214    0.8210   -0.7470    1.0920 ] (a) Find H(z) for the filter and plot its frequency response (magnitude and phase

Linspace function, Linspace function: Likewise, the linspace function ...

Linspace function: Likewise, the linspace function generates a linearly spaced vector; linspace(x,y,n) generates a vector with n values in the inclusive range from x to y. For

Hold and legend function - plot functions, Hold and legend function: ...

Hold and legend function: hold: is a toggle which freezes the present graph in the figure window, so that the new plots will be superimposed on the present one. Just hold

Write the iterative newton root fi nding function, Write the iterative Newt...

Write the iterative Newton root nding function from lecture to be recursive. The function declaration should be root = newtonRec(f,df,x,tol). The inputs to the function are: ?

Visual cryptography, how to implement 3 out of 4 visual cryptography in MAT...

how to implement 3 out of 4 visual cryptography in MATLAB?

Tuning Fractional PID using GA and PSO algorithm, my project is on load fre...

my project is on load frequency control using FPID tuned using GA and PSO algorithm.the system is a two area system.

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