SlideShare a Scribd company logo
Write a program in Matlab using Newton's method to solve this system of equations for x, y,
and z...
Solution
f=inline('[-10*p(:,1)-10*p(:,2); 28*p(:,1)-p(:,2)-p(:,1).*p(:,3); p(:,1).*p(:,2)-(8*p(:,3))/2]','p');
tol = 0.4e-6; %error tolerance
MaxIter = 10;
format long
x = sym('x') ;
y = sym('y') ;
z = sym('z') ;
F = f([x,y,z]);
J = jacobian(F);
invJ = inv(J);
s = zeros(MaxIter,3);
s(1,:) = [1 1 1]; % first set of values
dsnorm = inf;
iter = 1;
while dsnorm>tol && itertol && itertol && iter

More Related Content

More from arihantgiftgallery

A variety of media and culture conditions can be used to culture and .pdf
A variety of media and culture conditions can be used to culture and .pdfA variety of media and culture conditions can be used to culture and .pdf
A variety of media and culture conditions can be used to culture and .pdf
arihantgiftgallery
 
A program consists of 4 musical numbers and 3 speeches. In how many .pdf
A program consists of 4 musical numbers and 3 speeches. In how many .pdfA program consists of 4 musical numbers and 3 speeches. In how many .pdf
A program consists of 4 musical numbers and 3 speeches. In how many .pdf
arihantgiftgallery
 
A Moving to another question will save this response. Question 4 Iden.pdf
A Moving to another question will save this response. Question 4 Iden.pdfA Moving to another question will save this response. Question 4 Iden.pdf
A Moving to another question will save this response. Question 4 Iden.pdf
arihantgiftgallery
 
A plant with a very extensive root system would be able to better abs.pdf
A plant with a very extensive root system would be able to better abs.pdfA plant with a very extensive root system would be able to better abs.pdf
A plant with a very extensive root system would be able to better abs.pdf
arihantgiftgallery
 
property, plant, and equipment are categorized as property, pla.pdf
property, plant, and equipment are categorized as property, pla.pdfproperty, plant, and equipment are categorized as property, pla.pdf
property, plant, and equipment are categorized as property, pla.pdf
arihantgiftgallery
 
Why is it that bacterial ribosomes can begin translation before mRNA.pdf
Why is it that bacterial ribosomes can begin translation before mRNA.pdfWhy is it that bacterial ribosomes can begin translation before mRNA.pdf
Why is it that bacterial ribosomes can begin translation before mRNA.pdf
arihantgiftgallery
 
Write a C++ program with a function defined to give the person a .pdf
Write a C++ program with a function defined to give the person a .pdfWrite a C++ program with a function defined to give the person a .pdf
Write a C++ program with a function defined to give the person a .pdf
arihantgiftgallery
 
Which standards organization defined the Ethernet standardA.IEEE.pdf
Which standards organization defined the Ethernet standardA.IEEE.pdfWhich standards organization defined the Ethernet standardA.IEEE.pdf
Which standards organization defined the Ethernet standardA.IEEE.pdf
arihantgiftgallery
 
When the pH of a solution changes from 2 to 6 a) That solution beco.pdf
When the pH of a solution changes from 2 to 6 a) That solution beco.pdfWhen the pH of a solution changes from 2 to 6 a) That solution beco.pdf
When the pH of a solution changes from 2 to 6 a) That solution beco.pdf
arihantgiftgallery
 
Which is the correct answer Consider the characteristics of moss an.pdf
Which is the correct answer Consider the characteristics of moss an.pdfWhich is the correct answer Consider the characteristics of moss an.pdf
Which is the correct answer Consider the characteristics of moss an.pdf
arihantgiftgallery
 
Unequal crossing over is responsible for creating paracentric inversi.pdf
Unequal crossing over is responsible for creating paracentric inversi.pdfUnequal crossing over is responsible for creating paracentric inversi.pdf
Unequal crossing over is responsible for creating paracentric inversi.pdf
arihantgiftgallery
 
Using java script for an html page how do you add a name to a locati.pdf
Using java script for an html page how do you add a name to a locati.pdfUsing java script for an html page how do you add a name to a locati.pdf
Using java script for an html page how do you add a name to a locati.pdf
arihantgiftgallery
 
True False When the null hypothesis is not rejected, there is no p.pdf
True False When the null hypothesis is not rejected, there is no p.pdfTrue False When the null hypothesis is not rejected, there is no p.pdf
True False When the null hypothesis is not rejected, there is no p.pdf
arihantgiftgallery
 
Thesus the rat is in a labyrinth. Initially, he is in a chamber with.pdf
Thesus the rat is in a labyrinth. Initially, he is in a chamber with.pdfThesus the rat is in a labyrinth. Initially, he is in a chamber with.pdf
Thesus the rat is in a labyrinth. Initially, he is in a chamber with.pdf
arihantgiftgallery
 
summarizing the case #3 on facebook freedom of speech and giving add.pdf
summarizing the case #3 on facebook freedom of speech and giving add.pdfsummarizing the case #3 on facebook freedom of speech and giving add.pdf
summarizing the case #3 on facebook freedom of speech and giving add.pdf
arihantgiftgallery
 
So Far I have these two classes but I need help with my persontest c.pdf
So Far I have these two classes but I need help with my persontest c.pdfSo Far I have these two classes but I need help with my persontest c.pdf
So Far I have these two classes but I need help with my persontest c.pdf
arihantgiftgallery
 
Shock Case Study (15 pts)HPI. Mrs. K is a 22 yo college student, .pdf
Shock Case Study (15 pts)HPI. Mrs. K is a 22 yo college student, .pdfShock Case Study (15 pts)HPI. Mrs. K is a 22 yo college student, .pdf
Shock Case Study (15 pts)HPI. Mrs. K is a 22 yo college student, .pdf
arihantgiftgallery
 
results obtained for the different tests and the characteristics of .pdf
results obtained for the different tests and the characteristics of .pdfresults obtained for the different tests and the characteristics of .pdf
results obtained for the different tests and the characteristics of .pdf
arihantgiftgallery
 
Q1. What limits the number of different wavelengths that can be used.pdf
Q1. What limits the number of different wavelengths that can be used.pdfQ1. What limits the number of different wavelengths that can be used.pdf
Q1. What limits the number of different wavelengths that can be used.pdf
arihantgiftgallery
 
11. Internal validity refers to a. The extent to which a researcher.pdf
11. Internal validity refers to a. The extent to which a researcher.pdf11. Internal validity refers to a. The extent to which a researcher.pdf
11. Internal validity refers to a. The extent to which a researcher.pdf
arihantgiftgallery
 

More from arihantgiftgallery (20)

A variety of media and culture conditions can be used to culture and .pdf
A variety of media and culture conditions can be used to culture and .pdfA variety of media and culture conditions can be used to culture and .pdf
A variety of media and culture conditions can be used to culture and .pdf
 
A program consists of 4 musical numbers and 3 speeches. In how many .pdf
A program consists of 4 musical numbers and 3 speeches. In how many .pdfA program consists of 4 musical numbers and 3 speeches. In how many .pdf
A program consists of 4 musical numbers and 3 speeches. In how many .pdf
 
A Moving to another question will save this response. Question 4 Iden.pdf
A Moving to another question will save this response. Question 4 Iden.pdfA Moving to another question will save this response. Question 4 Iden.pdf
A Moving to another question will save this response. Question 4 Iden.pdf
 
A plant with a very extensive root system would be able to better abs.pdf
A plant with a very extensive root system would be able to better abs.pdfA plant with a very extensive root system would be able to better abs.pdf
A plant with a very extensive root system would be able to better abs.pdf
 
property, plant, and equipment are categorized as property, pla.pdf
property, plant, and equipment are categorized as property, pla.pdfproperty, plant, and equipment are categorized as property, pla.pdf
property, plant, and equipment are categorized as property, pla.pdf
 
Why is it that bacterial ribosomes can begin translation before mRNA.pdf
Why is it that bacterial ribosomes can begin translation before mRNA.pdfWhy is it that bacterial ribosomes can begin translation before mRNA.pdf
Why is it that bacterial ribosomes can begin translation before mRNA.pdf
 
Write a C++ program with a function defined to give the person a .pdf
Write a C++ program with a function defined to give the person a .pdfWrite a C++ program with a function defined to give the person a .pdf
Write a C++ program with a function defined to give the person a .pdf
 
Which standards organization defined the Ethernet standardA.IEEE.pdf
Which standards organization defined the Ethernet standardA.IEEE.pdfWhich standards organization defined the Ethernet standardA.IEEE.pdf
Which standards organization defined the Ethernet standardA.IEEE.pdf
 
When the pH of a solution changes from 2 to 6 a) That solution beco.pdf
When the pH of a solution changes from 2 to 6 a) That solution beco.pdfWhen the pH of a solution changes from 2 to 6 a) That solution beco.pdf
When the pH of a solution changes from 2 to 6 a) That solution beco.pdf
 
Which is the correct answer Consider the characteristics of moss an.pdf
Which is the correct answer Consider the characteristics of moss an.pdfWhich is the correct answer Consider the characteristics of moss an.pdf
Which is the correct answer Consider the characteristics of moss an.pdf
 
Unequal crossing over is responsible for creating paracentric inversi.pdf
Unequal crossing over is responsible for creating paracentric inversi.pdfUnequal crossing over is responsible for creating paracentric inversi.pdf
Unequal crossing over is responsible for creating paracentric inversi.pdf
 
Using java script for an html page how do you add a name to a locati.pdf
Using java script for an html page how do you add a name to a locati.pdfUsing java script for an html page how do you add a name to a locati.pdf
Using java script for an html page how do you add a name to a locati.pdf
 
True False When the null hypothesis is not rejected, there is no p.pdf
True False When the null hypothesis is not rejected, there is no p.pdfTrue False When the null hypothesis is not rejected, there is no p.pdf
True False When the null hypothesis is not rejected, there is no p.pdf
 
Thesus the rat is in a labyrinth. Initially, he is in a chamber with.pdf
Thesus the rat is in a labyrinth. Initially, he is in a chamber with.pdfThesus the rat is in a labyrinth. Initially, he is in a chamber with.pdf
Thesus the rat is in a labyrinth. Initially, he is in a chamber with.pdf
 
summarizing the case #3 on facebook freedom of speech and giving add.pdf
summarizing the case #3 on facebook freedom of speech and giving add.pdfsummarizing the case #3 on facebook freedom of speech and giving add.pdf
summarizing the case #3 on facebook freedom of speech and giving add.pdf
 
So Far I have these two classes but I need help with my persontest c.pdf
So Far I have these two classes but I need help with my persontest c.pdfSo Far I have these two classes but I need help with my persontest c.pdf
So Far I have these two classes but I need help with my persontest c.pdf
 
Shock Case Study (15 pts)HPI. Mrs. K is a 22 yo college student, .pdf
Shock Case Study (15 pts)HPI. Mrs. K is a 22 yo college student, .pdfShock Case Study (15 pts)HPI. Mrs. K is a 22 yo college student, .pdf
Shock Case Study (15 pts)HPI. Mrs. K is a 22 yo college student, .pdf
 
results obtained for the different tests and the characteristics of .pdf
results obtained for the different tests and the characteristics of .pdfresults obtained for the different tests and the characteristics of .pdf
results obtained for the different tests and the characteristics of .pdf
 
Q1. What limits the number of different wavelengths that can be used.pdf
Q1. What limits the number of different wavelengths that can be used.pdfQ1. What limits the number of different wavelengths that can be used.pdf
Q1. What limits the number of different wavelengths that can be used.pdf
 
11. Internal validity refers to a. The extent to which a researcher.pdf
11. Internal validity refers to a. The extent to which a researcher.pdf11. Internal validity refers to a. The extent to which a researcher.pdf
11. Internal validity refers to a. The extent to which a researcher.pdf
 

Recently uploaded

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 

Recently uploaded (20)

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 

Write a program in Matlab using Newtons method to solve this syste.pdf

  • 1. Write a program in Matlab using Newton's method to solve this system of equations for x, y, and z... Solution f=inline('[-10*p(:,1)-10*p(:,2); 28*p(:,1)-p(:,2)-p(:,1).*p(:,3); p(:,1).*p(:,2)-(8*p(:,3))/2]','p'); tol = 0.4e-6; %error tolerance MaxIter = 10; format long x = sym('x') ; y = sym('y') ; z = sym('z') ; F = f([x,y,z]); J = jacobian(F); invJ = inv(J); s = zeros(MaxIter,3); s(1,:) = [1 1 1]; % first set of values dsnorm = inf; iter = 1; while dsnorm>tol && itertol && itertol && iter