# matlab_che - MATLAB Applications in Chemical Engineering...

This preview shows pages 1–4. Sign up to view the full content.

MATLAB® Applications in Chemical Engineering James A. Carnell North Carolina State University MATLAB is a powerful code-based mathematical and engineering calculation program. It performs all calculations using matrices and vectors in a logical programming environment. This guide is a brief introduction to MATLAB in chemical engineering, and in no way attempts to be a comprehensive MATLAB learning resource. This guide is a starting point for the new MATLAB user, and as such no prior MATLAB experience is necessary. Further help can be found in the MATLAB help files or at Mathworks website at www.mathworks.com and in the help section at http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.shtml

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
MATLAB Applications in Chemical Engineering James A. Carnell, August 2003 Table of Contents Section I: How MATLAB Works » Basic MATLAB: The Language » Mfiles (Function files) » Dealing with Functions ± The ‘plot’ function ± The ‘fzero’ function ± Solving linear equations in MATLAB ± The ‘fsolve’ function Section II: Numerical and Symbolic Integration » Numerical Integration; Quadrature ± The Simpson’s Rule and Lobotto Quadrature » Symbolic Integration and Differentiation Section III: Numerically Solving Differential Equations and Systems of Differential Equations » First order ode’s » Higher order ode’s Appendix » Glossary of Commands, Parts I, II and II » Line Markers
MATLAB Applications in Chemical Engineering James A. Carnell, August 2003 Section I: How MATLAB works Most MATLAB commands can be run from the command window (shown below, on the right hand side of the interface). MATLAB commands can also be entered into a text file labeled with the ‘.m’ extension. These files are known as ‘m-files’. These commands can be broken down into scripts and programming. Scripts can be thought of as commands that instruct MATLAB to execute a particular function or pre-made program, and programming can be thought of as the raw code required to construct functions and programs within MATLAB. Generally, all programming must be contained within a file used by MATLAB (called an m-file), but script can be entered either in an m-file or directly into the command window. An image of the MATLAB interface is shown below. MATLAB contains many ready-made programs or functions that are conveniently arranged into different toolboxes. When using MATLAB, these toolboxes and their functions can be called upon and executed in any MATLAB script. In the above image, the toolbox selection or launch pad is shown (at the left hand side of the interface). Basic MATLAB: The language MATLAB uses a language that is somewhat similar to that of Maple 1 . The scripts or calling functions have a particular name and argument that must be entered into the function execution call. For example, to plot the sine function in MATLAB between 0 and 6 using the fplot command, the following code can be entered directly into the command window, or into an m-file: 1 Maple is a registered trademark of Waterloo Maple, Inc.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 26

matlab_che - MATLAB Applications in Chemical Engineering...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online