All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
The Taylor series can be used to calculate the value of an entire function at every point, if the value of the function, and of all of its derivatives, are known at a single point. clear all close all clc % Defining the function poly_p = [3 5 7]; % Derivating the function theoritically…
Amith Ganta
updated on 21 May 2021
The Taylor series can be used to calculate the value of an entire function at every point, if the value of the function, and of all of its derivatives, are known at a single point.
clear all
close all
clc
% Defining the function
poly_p = [3 5 7];
% Derivating the function theoritically
p_der = polyder(poly_p);
p_der_eval = polyval(p_der,0);
% Finite difference method - Forward difference method
x_0 = 0;
h = 0.1;
derivative_forward_difference_first_derivative = (polyval(poly_p, x_0+h) - polyval(poly_p,x_0))/h
% Finite difference method - Backward difference method
x_0 = 0;
h = 0.2;
derivative_backward_difference_first_derivative = (polyval(poly_p,x_0) - polyval(poly_p,x_0-h))/h
% Finite difference method - Central difference method
x_0 = 0;
h = 0.2;
derivative_central_difference_first_derivative = (polyval(poly_p,x_0+h) - polyval(poly_p,x_0-h))/(2*h)
Results
poly_p =
3 5 7
p_der =
6 5
p_der_eval =
5
derivative_forward_difference_first_derivative =
5.3000
derivative_backward_difference_first_derivative =
4.4000
derivative_central_difference_first_derivative =
5.0000
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Quater car modelling using Matlab
Quarter Car model …
25 Sep 2023 03:07 PM IST
Pacjeka combined slip
Pacjeka Magic Tyre model Pacjeka Magic Tyre model was developed by Prof.Hans Bastiaan Pacejka and it is widely used to represent empirically and interpolate previously measured…
05 Jun 2023 02:04 PM IST
Longitudinal and Lateral brush tyre model using Matlab
Tyre Modeling A tyre model is a mathematical or an empirical representation of the mechanism…
16 May 2023 07:14 PM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.