SlideShare a Scribd company logo
secant:
function[] = SecantMethod()
a=input('enterfunction:','s');
f=inline(a)
x(1)=input('enterfirstguess:');
x(2)=input('entersecondguess:');
tol=input('entertolerance:');
iteration=0;
i=2;
epsilon=1e10;
while (abs(epsilon) >tol)
x(i+1)=x(i)-f(x(i))*(x(i)-x(i-1))/(f(x(i))-f(x(i-1)));
epsilon=x(i+1)-x(i);
i = i+1;
x(i)
end

More Related Content

PPTX
Differential calculus maxima minima
PPT
linear transformation
PPT
DOUBLE INTEGRALS PPT GTU CALCULUS (2110014)
PPT
aem : Fourier series of Even and Odd Function
PPT
Interpolation functions
DOC
Xu ly anh
PPTX
Types of function
PPSX
Basic of number system
Differential calculus maxima minima
linear transformation
DOUBLE INTEGRALS PPT GTU CALCULUS (2110014)
aem : Fourier series of Even and Odd Function
Interpolation functions
Xu ly anh
Types of function
Basic of number system

What's hot (20)

PDF
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
PPT
Ch2 bieudien du lieu
DOCX
Three cards are drawn in succession.docx
PPTX
Bressenham’s Midpoint Circle Drawing Algorithm
PPT
multiplexers and demultiplexers
PDF
13 05-curl-and-divergence
PPTX
derivatives math
PPTX
11 octal number system
PDF
Fixed point iteration
PPTX
Continuous functions
PDF
5.5 Injective and surjective functions. Dynamic slides.
PPT
Verilog Lecture5 hust 2014
PDF
Read only memory(rom)
PPT
adder and subtractor
DOCX
4 bit uni shift reg
PPTX
Linear dependence & independence vectors
PPTX
Numerical integration
DOCX
Module 13: Arithmetic Function: Multiplicative Function; Definition and Basic...
PDF
Daa linear recurrences
PDF
Fourier series 1
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Ch2 bieudien du lieu
Three cards are drawn in succession.docx
Bressenham’s Midpoint Circle Drawing Algorithm
multiplexers and demultiplexers
13 05-curl-and-divergence
derivatives math
11 octal number system
Fixed point iteration
Continuous functions
5.5 Injective and surjective functions. Dynamic slides.
Verilog Lecture5 hust 2014
Read only memory(rom)
adder and subtractor
4 bit uni shift reg
Linear dependence & independence vectors
Numerical integration
Module 13: Arithmetic Function: Multiplicative Function; Definition and Basic...
Daa linear recurrences
Fourier series 1
Ad

More from Taimoor Muzaffar Gondal (20)

PDF
Basics of Computer
PPTX
Lecture 04: Errors During the Measurement Process
PDF
Introduction to Measurements-Lecture 01
PPTX
Updated Lecture 01- History of Atom
PPTX
Heat and Its Transfer
PPTX
Low, Medium and High Frequency Current
PPTX
Rectification and Electrotherapy
PPTX
Applications of EM Waves
PPTX
Electromagnetism Fundamentals
PPTX
Effects of Currents and Type of Cells and Batteries
PPTX
Current Electricity
PPTX
Static Electricity
PPTX
Lecture 01- Atomic Structure
PPTX
An Overview of PLC
TXT
Regula falsi MATLAB Code
TXT
Newton's method for MATLAB Code
TXT
Langrange method for MATLAB Code
TXT
Jacobi method for MATLAB
TXT
Gauss seidal Matlab Code
TXT
Finite difference Matlab Code
Basics of Computer
Lecture 04: Errors During the Measurement Process
Introduction to Measurements-Lecture 01
Updated Lecture 01- History of Atom
Heat and Its Transfer
Low, Medium and High Frequency Current
Rectification and Electrotherapy
Applications of EM Waves
Electromagnetism Fundamentals
Effects of Currents and Type of Cells and Batteries
Current Electricity
Static Electricity
Lecture 01- Atomic Structure
An Overview of PLC
Regula falsi MATLAB Code
Newton's method for MATLAB Code
Langrange method for MATLAB Code
Jacobi method for MATLAB
Gauss seidal Matlab Code
Finite difference Matlab Code
Ad

Recently uploaded (20)

PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
Internet of Things (IOT) - A guide to understanding
PPT
introduction to datamining and warehousing
PPT
Project quality management in manufacturing
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Sustainable Sites - Green Building Construction
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
additive manufacturing of ss316l using mig welding
PPT
Mechanical Engineering MATERIALS Selection
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
PPT on Performance Review to get promotions
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Internet of Things (IOT) - A guide to understanding
introduction to datamining and warehousing
Project quality management in manufacturing
Lecture Notes Electrical Wiring System Components
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Sustainable Sites - Green Building Construction
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
Automation-in-Manufacturing-Chapter-Introduction.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
additive manufacturing of ss316l using mig welding
Mechanical Engineering MATERIALS Selection
bas. eng. economics group 4 presentation 1.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPT on Performance Review to get promotions

Matlab code for secant method