SlideShare a Scribd company logo
1 of 1
function[dx]=finitediff(x,y)
%it executes forward,backward and central diffrence at two points%
x=[2 3 4];
y=[8 27 64];
n=length(x);
dx(1)=(y(2)-y(1))/(x(2)-x(1));
for i=2:n-1
dx(i)=(y(i+1)-y(i-1))/(x(i+1)-x(i-1));
end
dx(n)=(y(n)-y(n-1))/(x(n)-x(n-1));
-------------
Taimoor Gondal

More Related Content

What's hot

A brief introduction to finite difference method
A brief introduction to finite difference methodA brief introduction to finite difference method
A brief introduction to finite difference methodPrateek Jha
 
19 min max-saddle-points
19 min max-saddle-points19 min max-saddle-points
19 min max-saddle-pointsmath267
 
Application of Laplace Transforme
Application of Laplace TransformeApplication of Laplace Transforme
Application of Laplace TransformeMaharshi Dave
 
Elementary Linear Algebra 5th Edition Larson Solutions Manual
Elementary Linear Algebra 5th Edition Larson Solutions ManualElementary Linear Algebra 5th Edition Larson Solutions Manual
Elementary Linear Algebra 5th Edition Larson Solutions Manualzuxigytix
 
91277687 solution-manual-for-mathematical-modelling-with-case-studies-taylor-...
91277687 solution-manual-for-mathematical-modelling-with-case-studies-taylor-...91277687 solution-manual-for-mathematical-modelling-with-case-studies-taylor-...
91277687 solution-manual-for-mathematical-modelling-with-case-studies-taylor-...Akul Bansal
 
Function of several variables
Function of several variablesFunction of several variables
Function of several variablesKamel Attar
 
Solutions Manual for Fundamentals Of Differential Equations 8th Edition by Nagle
Solutions Manual for Fundamentals Of Differential Equations 8th Edition by NagleSolutions Manual for Fundamentals Of Differential Equations 8th Edition by Nagle
Solutions Manual for Fundamentals Of Differential Equations 8th Edition by NagleWillowew
 
Transformations (complex variable & numerical method)
Transformations (complex variable & numerical method)Transformations (complex variable & numerical method)
Transformations (complex variable & numerical method)Digvijaysinh Gohil
 
Differential calculus maxima minima
Differential calculus  maxima minimaDifferential calculus  maxima minima
Differential calculus maxima minimaSanthanam Krishnan
 
Jacobi and gauss-seidel
Jacobi and gauss-seidelJacobi and gauss-seidel
Jacobi and gauss-seidelarunsmm
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equationsZunAib Ali
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transformop205
 
PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES
PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES   PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES
PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES Mazharul Islam
 

What's hot (20)

Divided difference Matlab code
Divided difference Matlab codeDivided difference Matlab code
Divided difference Matlab code
 
Gamma function
Gamma functionGamma function
Gamma function
 
A brief introduction to finite difference method
A brief introduction to finite difference methodA brief introduction to finite difference method
A brief introduction to finite difference method
 
B.Tech-II_Unit-V
B.Tech-II_Unit-VB.Tech-II_Unit-V
B.Tech-II_Unit-V
 
19 min max-saddle-points
19 min max-saddle-points19 min max-saddle-points
19 min max-saddle-points
 
Dyadics
DyadicsDyadics
Dyadics
 
Application of Laplace Transforme
Application of Laplace TransformeApplication of Laplace Transforme
Application of Laplace Transforme
 
Elementary Linear Algebra 5th Edition Larson Solutions Manual
Elementary Linear Algebra 5th Edition Larson Solutions ManualElementary Linear Algebra 5th Edition Larson Solutions Manual
Elementary Linear Algebra 5th Edition Larson Solutions Manual
 
91277687 solution-manual-for-mathematical-modelling-with-case-studies-taylor-...
91277687 solution-manual-for-mathematical-modelling-with-case-studies-taylor-...91277687 solution-manual-for-mathematical-modelling-with-case-studies-taylor-...
91277687 solution-manual-for-mathematical-modelling-with-case-studies-taylor-...
 
Quadricas (novo)
Quadricas (novo)Quadricas (novo)
Quadricas (novo)
 
Function of several variables
Function of several variablesFunction of several variables
Function of several variables
 
Initial Value Problems
Initial Value ProblemsInitial Value Problems
Initial Value Problems
 
Solutions Manual for Fundamentals Of Differential Equations 8th Edition by Nagle
Solutions Manual for Fundamentals Of Differential Equations 8th Edition by NagleSolutions Manual for Fundamentals Of Differential Equations 8th Edition by Nagle
Solutions Manual for Fundamentals Of Differential Equations 8th Edition by Nagle
 
Fourier series 1
Fourier series 1Fourier series 1
Fourier series 1
 
Transformations (complex variable & numerical method)
Transformations (complex variable & numerical method)Transformations (complex variable & numerical method)
Transformations (complex variable & numerical method)
 
Differential calculus maxima minima
Differential calculus  maxima minimaDifferential calculus  maxima minima
Differential calculus maxima minima
 
Jacobi and gauss-seidel
Jacobi and gauss-seidelJacobi and gauss-seidel
Jacobi and gauss-seidel
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transform
 
PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES
PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES   PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES
PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES
 

More from Taimoor Muzaffar Gondal

Lecture 04: Errors During the Measurement Process
Lecture 04: Errors During the Measurement ProcessLecture 04: Errors During the Measurement Process
Lecture 04: Errors During the Measurement ProcessTaimoor Muzaffar Gondal
 
Effects of Currents and Type of Cells and Batteries
Effects of Currents and Type of Cells and BatteriesEffects of Currents and Type of Cells and Batteries
Effects of Currents and Type of Cells and BatteriesTaimoor Muzaffar Gondal
 

More from Taimoor Muzaffar Gondal (20)

Basics of Computer
Basics of ComputerBasics of Computer
Basics of Computer
 
Lecture 04: Errors During the Measurement Process
Lecture 04: Errors During the Measurement ProcessLecture 04: Errors During the Measurement Process
Lecture 04: Errors During the Measurement Process
 
Introduction to Measurements-Lecture 01
Introduction to Measurements-Lecture 01Introduction to Measurements-Lecture 01
Introduction to Measurements-Lecture 01
 
Updated Lecture 01- History of Atom
Updated Lecture 01- History of AtomUpdated Lecture 01- History of Atom
Updated Lecture 01- History of Atom
 
Heat and Its Transfer
Heat and Its TransferHeat and Its Transfer
Heat and Its Transfer
 
Low, Medium and High Frequency Current
Low, Medium and High Frequency CurrentLow, Medium and High Frequency Current
Low, Medium and High Frequency Current
 
Rectification and Electrotherapy
Rectification and ElectrotherapyRectification and Electrotherapy
Rectification and Electrotherapy
 
Applications of EM Waves
Applications of EM WavesApplications of EM Waves
Applications of EM Waves
 
Electromagnetism Fundamentals
Electromagnetism FundamentalsElectromagnetism Fundamentals
Electromagnetism Fundamentals
 
Effects of Currents and Type of Cells and Batteries
Effects of Currents and Type of Cells and BatteriesEffects of Currents and Type of Cells and Batteries
Effects of Currents and Type of Cells and Batteries
 
Current Electricity
Current ElectricityCurrent Electricity
Current Electricity
 
Static Electricity
Static ElectricityStatic Electricity
Static Electricity
 
Lecture 01- Atomic Structure
Lecture 01- Atomic StructureLecture 01- Atomic Structure
Lecture 01- Atomic Structure
 
An Overview of PLC
An Overview of PLCAn Overview of PLC
An Overview of PLC
 
Regula falsi MATLAB Code
Regula falsi MATLAB CodeRegula falsi MATLAB Code
Regula falsi MATLAB Code
 
Newton's method for MATLAB Code
Newton's method for MATLAB CodeNewton's method for MATLAB Code
Newton's method for MATLAB Code
 
Langrange method for MATLAB Code
Langrange method for MATLAB CodeLangrange method for MATLAB Code
Langrange method for MATLAB Code
 
Jacobi method for MATLAB
Jacobi method for MATLAB Jacobi method for MATLAB
Jacobi method for MATLAB
 
Gauss seidal Matlab Code
Gauss seidal Matlab CodeGauss seidal Matlab Code
Gauss seidal Matlab Code
 
Bisection methode alternate
Bisection methode alternateBisection methode alternate
Bisection methode alternate
 

Recently uploaded

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 

Recently uploaded (20)

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 

Finite difference method for function derivatives