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

  Using the models in system design

In the System Analysis and Design: Models are used extensively in the wide variety of the technical occupations beyond the information technology.

  Create a program that begins by prompting the user

Create a program that begins by prompting the user for an input file (which contains the message), 5 shift amounts (all integers).

  How do you verify that directory structures are identical

How do you verify that the directory structures are identical? Describe three situations when the sequence won't work properly.

  Explain the diamond problem when using multiple inheritance

Explain the diamond problem when using multiple inheritance - List 2 programming languages which support multiple inheritance.

  Propose a method to address the difficulties you identified

Per the text, audit findings focus on four areas: criteria, circumstance, cause, and impact. Determine the area that you believe might be the most difficult.

  What must the first markup output of servlet to a client be

What must the first markup output of a servlet to a client be? What class of object is used to create markup output of a servlet to a client?

  What are the major architectural differences

Write a sequence of instructions to reverse the order of the bits of register DO.

  What are some concerns with interconnectivity

What are some of the advantages and disadvantages of telecommunications in the United States and other countries?

  Big data is a term used to describe the voluminous amount

big data is a term used to describe the voluminous amount of structured and semi-structured data generated by

  Merging using this process

Merging is the mehood of combining two sorted lists into a single sorted list. In some cases, one list can be appended to the other, and the new list then can be sorted. Merging using this method, though, is not always the most efficient.

  Define the use and importance of a guided navigation system

explain the use and importance of a guided navigation system and shopping cart for a website designed for e-commerce and business purpose. Also explain how the site should take payments using a payment gateway.

  Make an abstract class called aqualife

Fish has an attribute that stores whether the fish is an herbivore or a carnivore. Its eats method checks whether herbivore or carnivore, and prints 'This fish eats veggies' for herbivores and 'This fish eats other fish' for carnivores.

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