Calculate and plot the error of the forward difference

Assignment Help Computer Engineering
Reference no: EM132201304

Question :

Write a MATLAB function which calculates and plots the error of both the forward and central difference approximations of the first derivative of a polynomial as a function of the step size. The function will have three inputs:

1. a vector whose elements are the coefficients of the polynomial,

2. the point at which the derivative of the function is to be approximated, and

3. the initial step size. The output should be a log-log plot of the error as a function of the step size.

This function should call the functions from problems 1 and 2 to approximate the derivative at the specified point using the initial step size. This should be repeated 10 times using progressively smaller step sizes (by factors of 10).

The error for each step size should then be calculated based on the known value of the derivative at the specified point and then plotted.

The plot should be publishable quality. Write an explanation of the results which discusses the following:

a. A comparison (qualitative and quantitative) of the error of the two finite difference methods (include a comparison of the expected and actual order of error for both methods).

b. An explanation of how and why the error changed with changing step size.

Reference no: EM132201304

Questions Cloud

Importance of visuals in connecting with audience : Consider the importance of visuals in connecting with an audience.
British petroleum could have managed crisis more effectively : Do you think that BP (British Petroleum) could have managed the crisis more effectively? Why or why not?
Create long-term strategic hr plan for this organization : You have been hired as a consultant for a small start-up organization. Create a long-term strategic HR plan for this organization.
Write a logical expression for a web search engine : Write a logical expression for a Web search engine to find sites pertaining to coastal wetlands in Lounisiana but not in Alabama.
Calculate and plot the error of the forward difference : Write a MATLAB function which calculates and plots the error of both the forward and central difference approximations of the first derivative of a polynomial.
Create a gaussian lowpass filter and apply : Create a Gaussian highpass filter and apply it to the Fourier coefficients of img1. Create a Gaussian lowpass filter and apply .
Write a matlab code that defines two symbolic matrices : Write a Matlab code that Defines two symbolic 4 times 5 matrices A and B.
Display the program title and programmers name : Display the program title and programmer's name. Then get the user's name, and greet the user.
How to get the large constant in a register : Write the LEGv8 assembly for the following code snippet. One trick is to figure out how to get the large constant in a register when the ADDI instruction only.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Describe the disjunctive normal form

Express each of the different Boolean expressions in disjunctive normal form in four variables using just the NOR operator, with as few NOR operators.

  How the next-state samples are generated

Present the algorithm clearly and mathematically, specifying exactly how the weights are computed and how the next-state samples are generated.

  Define the concept of inheritance can be utilized

Discuss with your classmates an example of an object or concept where the concept of inheritance can be utilized

  Prepare a use case diagram

Prepare a Use Case Diagram based on the given problem description.

  3d animation using in object modelling and methods

Ngaruwahia Golf Course sits on the banks of the mighty Waikato River. This club is an easy 10 minutes' drive north of Hamilton and an hour's drive south of central Auckland along State Highway1.

  How cloud makes dlp more difficult

What do you think about how cloud makes DLP (Data Loss Prevention) more difficult?

  Define a function that inserts a given integer into a bst

Define a function that inserts a given integer into a BST. Define a function that maps a given unsorted integer list to a BST, using your insertion function.

  Analyze in detail the major risks surrounding byod

Analyze in detail the major risks surrounding BYOD, and analyze the security controls and technologies that are currently available and being utilized to manage these risks.

  How to write java code for a program that loads a map

How to write JAVA code for a program that loads a map from a text file and draws a rectangle that moves corresponding.

  What opportunities exist to improve supply chain activities

What opportunities exist to improve supply chain activities through better alignment of logistics and the company's strategic plan?

  Compare the use package clause and the use type clause

Explain what the with and use clauses do. Compare the use package clause and the use type clause. Why should Ada programmers avoid the use package clause?

  Prepare a program that allows the user to pick a file

Write a program that allows the user to pick a file, doubles the red value of each pixel in the picture, and shows the picture.

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