29-08-2016, 04:46 PM
1451556388-matlab.pdf (Size: 323.97 KB / Downloads: 5)
Preface
“Introduction to MATLAB for Engineering Students” is a document for an introductory
course in MATLAB°R 1 and technical computing. It is used for freshmen classes at Northwestern
University. This document is not a comprehensive introduction or a reference manual.
Instead, it focuses on the specific features of MATLAB that are useful for engineering
classes. The lab sessions are used with one main goal: to allow students to become familiar
with computer software (e.g., MATLAB) to solve application problems. We assume that the
students have no prior experience with MATLAB.
The availability of technical computing environment such as MATLAB is now reshaping
the role and applications of computer laboratory projects to involve students in more intense
problem-solving experience. This availability also provides an opportunity to easily conduct
numerical experiments and to tackle realistic and more complicated problems.
Originally, the manual is divided into computer laboratory sessions (labs). The lab
document is designed to be used by the students while working at the computer. The
emphasis here is “learning by doing”. This quiz-like session is supposed to be fully completed
in 50 minutes in class.
The seven lab sessions include not only the basic concepts of MATLAB, but also an introduction
to scientific computing, in which they will be useful for the upcoming engineering
courses. In addition, engineering students will see MATLAB in their other courses.
The end of this document contains two useful sections: a Glossary which contains the
brief summary of the commands and built-in functions as well as a collection of release notes.
The release notes, which include several new features of the Release 14 with Service Pack
2, well known as R14SP2, can also be found in Appendix. All of the MATLAB commands
have been tested to take advantage with new features of the current version of MATLAB
available here at Northwestern (R14SP2). Although, most of the examples and exercises still
work with previous releases as well.
This manual reflects the ongoing effort of the McCormick School of Engineering and
Applied Science leading by Dean Stephen Carr to institute a significant technical computing
in the Engineering First°R 2
courses taught at Northwestern University.
Finally, the students - Engineering Analysis (EA) Section - deserve my special gratitude.
They were very active participants in class.
Introduction
The tutorials are independent of the rest of the document. The primarily objective is to help
you learn quickly the first steps. The emphasis here is “learning by doing”. Therefore, the
best way to learn is by trying it yourself. Working through the examples will give you a feel
for the way that MATLAB operates. In this introduction we will describe how MATLAB
handles simple numerical expressions and mathematical formulas.
The name MATLAB stands for MATrix LABoratory. MATLAB was written originally
to provide easy access to matrix software developed by the LINPACK (linear system package)
and EISPACK (Eigen system package) projects.
MATLAB [1] is a high-performance language for technical computing. It integrates
computation, visualization, and programming environment. Furthermore, MATLAB is a
modern programming language environment: it has sophisticated data structures, contains
built-in editing and debugging tools, and supports object-oriented programming. These factors
make MATLAB an excellent tool for teaching and research.
MATLAB has many advantages compared to conventional computer languages (e.g.,
C, FORTRAN) for solving technical problems. MATLAB is an interactive system whose
basic data element is an array that does not require dimensioning. The software package
has been commercially available since 1984 and is now considered as a standard tool at most
universities and industries worldwide.
It has powerful built-in routines that enable a very wide variety of computations. It
also has easy to use graphics commands that make the visualization of results immediately
available. Specific applications are collected in packages referred to as toolbox. There are
toolboxes for signal processing, symbolic computation, control theory, simulation, optimization,
and several other fields of applied science and engineering.
In addition to the MATLAB documentation which is mostly available on-line, we would
1
recommend the following books: [2], [3], [4], [5], [6], [7], [8], and [9]. They are excellent in
their specific applications.
1.2 Basic features
As we mentioned earlier, the following tutorial lessons are designed to get you started
quickly in MATLAB. The lessons are intended to make you familiar with the basics of
MATLAB. We urge you to complete the exercises given at the end of each lesson.
1.3 A minimum MATLAB session
The goal of this minimum session (also called starting and exiting sessions) is to learn the
first steps:
• How to log on
• Invoke MATLAB
• Do a few simple calculations
• How to quit MATLAB
1.3.1 Starting MATLAB
After logging into your account, you can enter MATLAB by double-clicking on the MATLAB
shortcut icon (MATLAB 7.0.4) on your Windows desktop. When you start MATLAB, a
special window called the MATLAB desktop appears. The desktop is a window that contains
other windows. The major tools within or accessible from the desktop are:
• The Command Window
• The Command History
• The Workspace
• The Current Directory
• The Help Browser
• The Start button