Transcription of Solving Nonlinear Equation(s) in MATLAB
{{id}} {{{paragraph}}}
CHEE 222: PROCESS DYNAMICS AND NUMERICAL METHODS Prepared by Kunal Karan 1 Solving Nonlinear Equation(s) in MATLAB 1 Introduction This tutorial helps you use MATLAB to solve Nonlinear algebraic equations of single or multiple variables. 2 Writing MATLAB functions In order to use the MATLAB solvers, you must first be able to write MATLAB functions. There are two different methods to create a function - (a) inline command, and (b) MATLAB editor The inline command The inline command can be used for simple, one-line functions.
Accordingly, the polynomial must be defined in MATLAB as follows: p = [1 0 -3 0 2]: 5 FSOLVE The MATLAB routine fsolve is used to solve sets of nonlinear algebraic equations using a quasi-Newton method. The user must supply a routine to evaluate the function vector. Consider the following system of nonlinear equations, and solve for x1 and x2:
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}