Question: Objective Using MatLab with user entered anonymous functions. Project The instantaneous rate of a change of a function is an important application in engineering. In

Objective Using MatLab with user entered anonymous functions.
Project The instantaneous rate of a change of a function is an important application in engineering.
In its purest sense it is the derivative of a function, but in programming it is necessary to
implement it as an approximation.
Write a program the prompts the user to enter a function as a string of text. This func-
tion should be made into an anonymous function. This is all to be done in the function
get_function.
It will then ask for a value of an input point at which your program will estimate the derivative
of the entered function. The program should also plot a graph of the function on an interval
surrounding the point, as well as drawing the tangent line on the graph at the point.
The estimate of the derivative for a function f(x) is
f'(x)=limx1x0f(x1)-f(x0)x1-x0
=limx0f(x0+x)-f(x0)x
This is not the code for the program. You will convert it to the appropriate MatLab code. You
DO NOT take a limit. Instead hard code a deltaX with an appropriately small value in the
derivative function and use it.
The template includes a function, plot_function_tangent that will plot the function that
the user enters, and the tangent line at the point that you select.
The program must be written using top-down design.
Remember that every program that you submit must include an introduction consisting of
your name, the date, and a description of the program as both comments at the begin-
ning of the program and as text that is printed when you first run the program - the printed
component should be your print_header function..
Objective Using MatLab with user entered

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!