BACKGROUND

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

BACKGROUND

What is MATLAB?

MATLAB 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.
Typical uses include:
 Math and computation
 Algorithm development
 Modeling, simulation and prototyping
 Data analysis, exploration and visualization
 Scientific and engineering graphics
 Application development, including Graphical user interface building
MATLAB is an integrative system whose basic data element is an array that
does not require dimensioning. This allows you to solve many technical
computing problems, especially those with matrix and vector formulations, in a
fraction of the time it would take to write a program in a scalar no interactive
language such as C or Fortran.
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.
Basic features

As we mentioned earlier, the following tutorial lessons are designed to get


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.

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

When MATLAB is started for the first time, the screen looks like the one that
shown in the Figure 1.1. This illustration also shows the default configuration of
the MATLAB desktop. You can customize the arrangement of tools and
documents to suit your needs.

Now, we are interested in doing some simple calculations. We will assume that
we have sufficient understanding of our computer under which MATLAB is
being run.
We are now faced with the MATLAB desktop on our computer, which contains
the prompt (>>) in the Command Window. Usually, there are 2 types of prompt:
>> for full version
EDU> for educational version
Note: To simplify the notation, we will use this prompt, >>, as a standard
prompt sign, though our MATLAB version is for educational purpose.

Using MATLAB as a calculator:


As an example of a simple interactive calculation, just type the expression we
want to evaluate. Let's start at the very beginning. For example, let's suppose
you want to calculate the expression, 1 + 2 £ 3. You type it at the prompt
command (>>) as follows,
>> 1+2*3
ans =7
We will have noticed that if you do not specify an output variable, MATLAB
uses a default variable and, short for answer, to store the results of the current
calculation. Note that the variable and is created. To avoid this, you may assign
a value to a variable or output argument name. For example,
>> x = 1+2*3
x =7
will result in x being given the value 1 + 2 £ 3 = 7. This variable name can
always be used to refer to the results of the previous computations. Therefore,
computing 4x will result in
>> 4*x
ans = 28.0000
Before we conclude this minimum session, Table 1.1 gives the partial list of
arithmetic operators.
Table: Basic arithmetic operators
Symbol Operation Example
+ Addition 2+3
- Subtraction 2¡3
* Multiplication 2 ¤ 3
= Division 2=3

The MATLAB language:


This is a high-level matrix array language with control flow statements,
functions, and data structures, input/output and object-oriented programming
features. It allows both programming in the small to rapidly create quick and
dirty throw-away programs and programming in the large to create complete
large and complex application programs.

You might also like