SlideShare a Scribd company logo
1 of 2
Download to read offline
x = 1;
maxn = 50;
epsilon = 1;
xval = x;
n = 0;
%start processing here
while epsilon>=1e-5 & n<=maxn
y = x - (e.^(-cos(x)));
xval = [xval;y];
epsilon = abs(y-x);
x=y;
n=n+1;
end
% print root here
x
Solution
x = 1;
maxn = 50;
epsilon = 1;
xval = x;
n = 0;
%start processing here
while epsilon>=1e-5 & n<=maxn
y = x - (e.^(-cos(x)));
xval = [xval;y];
epsilon = abs(y-x);
x=y;
n=n+1;
end
% print root here
x

More Related Content

More from ankkitextailes

1.   “Internal auditors support managements efforts to establish a.pdf
1.   “Internal auditors support managements efforts to establish a.pdf1.   “Internal auditors support managements efforts to establish a.pdf
1.   “Internal auditors support managements efforts to establish a.pdf
ankkitextailes
 
The Fraud triangle is a framework designed to explain the reasoning .pdf
The Fraud triangle is a framework designed to explain the reasoning .pdfThe Fraud triangle is a framework designed to explain the reasoning .pdf
The Fraud triangle is a framework designed to explain the reasoning .pdf
ankkitextailes
 
The absorptivity, The transmissivity and reflectivity are given by.pdf
The absorptivity, The transmissivity and reflectivity are given by.pdfThe absorptivity, The transmissivity and reflectivity are given by.pdf
The absorptivity, The transmissivity and reflectivity are given by.pdf
ankkitextailes
 
RNA sequencing also known as next generation genome sequencing and t.pdf
RNA sequencing also known as next generation genome sequencing and t.pdfRNA sequencing also known as next generation genome sequencing and t.pdf
RNA sequencing also known as next generation genome sequencing and t.pdf
ankkitextailes
 
Pete Best (born 24 November 1941) is a British mu.pdf
                     Pete Best (born 24 November 1941) is a British mu.pdf                     Pete Best (born 24 November 1941) is a British mu.pdf
Pete Best (born 24 November 1941) is a British mu.pdf
ankkitextailes
 

More from ankkitextailes (20)

1.) f(x) has  rootSolution1.) f(x) has  root.pdf
1.) f(x) has  rootSolution1.) f(x) has  root.pdf1.) f(x) has  rootSolution1.) f(x) has  root.pdf
1.) f(x) has  rootSolution1.) f(x) has  root.pdf
 
4P + 5O2 = P4O10 molar ratio of P to O = 45 mole.pdf
                     4P + 5O2 = P4O10 molar ratio of P to O = 45 mole.pdf                     4P + 5O2 = P4O10 molar ratio of P to O = 45 mole.pdf
4P + 5O2 = P4O10 molar ratio of P to O = 45 mole.pdf
 
1.   “Internal auditors support managements efforts to establish a.pdf
1.   “Internal auditors support managements efforts to establish a.pdf1.   “Internal auditors support managements efforts to establish a.pdf
1.   “Internal auditors support managements efforts to establish a.pdf
 
(ii)Methane also affects the degradation of the ozone layerSolut.pdf
(ii)Methane also affects the degradation of the ozone layerSolut.pdf(ii)Methane also affects the degradation of the ozone layerSolut.pdf
(ii)Methane also affects the degradation of the ozone layerSolut.pdf
 
z= e^(1-i3) = e.e^(-i3)we know that e^-ix = cos x - i sin xso .pdf
z= e^(1-i3) = e.e^(-i3)we know that e^-ix = cos x - i sin xso .pdfz= e^(1-i3) = e.e^(-i3)we know that e^-ix = cos x - i sin xso .pdf
z= e^(1-i3) = e.e^(-i3)we know that e^-ix = cos x - i sin xso .pdf
 
Wild typeDeletion MutantApart from these bands, probe will sho.pdf
Wild typeDeletion MutantApart from these bands, probe will sho.pdfWild typeDeletion MutantApart from these bands, probe will sho.pdf
Wild typeDeletion MutantApart from these bands, probe will sho.pdf
 
The Fraud triangle is a framework designed to explain the reasoning .pdf
The Fraud triangle is a framework designed to explain the reasoning .pdfThe Fraud triangle is a framework designed to explain the reasoning .pdf
The Fraud triangle is a framework designed to explain the reasoning .pdf
 
SumNumbers.java import java.util.Scanner;public class SumNumbe.pdf
SumNumbers.java import java.util.Scanner;public class SumNumbe.pdfSumNumbers.java import java.util.Scanner;public class SumNumbe.pdf
SumNumbers.java import java.util.Scanner;public class SumNumbe.pdf
 
The absorptivity, The transmissivity and reflectivity are given by.pdf
The absorptivity, The transmissivity and reflectivity are given by.pdfThe absorptivity, The transmissivity and reflectivity are given by.pdf
The absorptivity, The transmissivity and reflectivity are given by.pdf
 
Curly brackets mean exactly the same as ordinary parentheses in thi.pdf
 Curly brackets mean exactly the same as ordinary parentheses in thi.pdf Curly brackets mean exactly the same as ordinary parentheses in thi.pdf
Curly brackets mean exactly the same as ordinary parentheses in thi.pdf
 
Solution (A)Nowadays Sugar is not listed directly by name suga.pdf
Solution  (A)Nowadays Sugar is not listed directly by name suga.pdfSolution  (A)Nowadays Sugar is not listed directly by name suga.pdf
Solution (A)Nowadays Sugar is not listed directly by name suga.pdf
 
RNA sequencing also known as next generation genome sequencing and t.pdf
RNA sequencing also known as next generation genome sequencing and t.pdfRNA sequencing also known as next generation genome sequencing and t.pdf
RNA sequencing also known as next generation genome sequencing and t.pdf
 
option b ,here return type is int and the Logical operator OR us.pdf
option b ,here return type is int and the Logical operator OR us.pdfoption b ,here return type is int and the Logical operator OR us.pdf
option b ,here return type is int and the Logical operator OR us.pdf
 
RbF because lattice energy is inversly proportio.pdf
                     RbF  because lattice energy is inversly proportio.pdf                     RbF  because lattice energy is inversly proportio.pdf
RbF because lattice energy is inversly proportio.pdf
 
Pete Best (born 24 November 1941) is a British mu.pdf
                     Pete Best (born 24 November 1941) is a British mu.pdf                     Pete Best (born 24 November 1941) is a British mu.pdf
Pete Best (born 24 November 1941) is a British mu.pdf
 
pH=pK1 + log[n(HCO3-)n(H2CO3)]=-log(4.710-7)+lo.pdf
                     pH=pK1 + log[n(HCO3-)n(H2CO3)]=-log(4.710-7)+lo.pdf                     pH=pK1 + log[n(HCO3-)n(H2CO3)]=-log(4.710-7)+lo.pdf
pH=pK1 + log[n(HCO3-)n(H2CO3)]=-log(4.710-7)+lo.pdf
 
Options are missing .pdf
                     Options are missing                              .pdf                     Options are missing                              .pdf
Options are missing .pdf
 
NO- = 16 electrons total order of Mo sigma 1s .pdf
                     NO- = 16 electrons total order of Mo sigma 1s .pdf                     NO- = 16 electrons total order of Mo sigma 1s .pdf
NO- = 16 electrons total order of Mo sigma 1s .pdf
 
NaOH is a strong electrolyte i.e. it is highly so.pdf
                     NaOH is a strong electrolyte i.e. it is highly so.pdf                     NaOH is a strong electrolyte i.e. it is highly so.pdf
NaOH is a strong electrolyte i.e. it is highly so.pdf
 
moles = wtmolar mass ==201.3moles .pdf
                     moles = wtmolar mass ==201.3moles              .pdf                     moles = wtmolar mass ==201.3moles              .pdf
moles = wtmolar mass ==201.3moles .pdf
 

Recently uploaded

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 

Recently uploaded (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

x = 1; maxn = 50; epsilon = 1; xval = x; n = 0; start pro.pdf

  • 1. x = 1; maxn = 50; epsilon = 1; xval = x; n = 0; %start processing here while epsilon>=1e-5 & n<=maxn y = x - (e.^(-cos(x))); xval = [xval;y]; epsilon = abs(y-x); x=y; n=n+1; end % print root here x Solution x = 1; maxn = 50; epsilon = 1; xval = x; n = 0; %start processing here while epsilon>=1e-5 & n<=maxn y = x - (e.^(-cos(x))); xval = [xval;y]; epsilon = abs(y-x); x=y; n=n+1; end % print root here
  • 2. x