{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture_F11_ECH157_fsolve

# Lecture_F11_ECH157_fsolve - F =[2 x(1 x(2 exp-x(1-x(1 2 x(2...

This preview shows page 1. Sign up to view the full content.

Solving nonlinear equations using M ATLAB fsolve finds the root for a system of nonlinear equations F ( x ) = 0 where x is a vector and F ( x ) is a vector function of x . For example, x = bracketleftbigg x 1 x 2 bracketrightbigg (1) F ( x )= bracketleftbigg 2 x 1 - x 2 - e - x 1 - x 1 +2 x 2 - e - x 2 bracketrightbigg (2) The basic syntax is x = fsolve(myfun,x0) where myfun defines the system of nonlin- ear equations you want to solve (usually) in a M
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: F = [2 * x(1) - x(2) - exp(-x(1));-x(1) + 2 * x(2) - exp(-x(2))]; x is the initial guess for the root and fsolve returns the calculated root for the system of non-linear equations. For more information about fsolve , please see http://www.mathworks.com/help/toolbox/optim/ug/fsolve.html...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern