SlideShare a Scribd company logo
1 of 1
Download to read offline
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

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
 
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
 

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

Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 

Recently uploaded (20)

How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptxMichaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell Tolls
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 

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