Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Tsegay G.
Programming
Basics
MATLAB Fundamentals
Programming
Basics
MATLAB Fundamentals
Basics of MATLAB
Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
1 Programming Basics For?
What is Aspen Plus
Basics of MATLAB
Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand For?
What is Aspen Plus process simulation model?
Introduction Programming
Basics
What is MATLAB? MATLAB Fundamentals
Basics of MATLAB
MATLAB stands for MATrix LABoratory Matrices and Vectors
Introducing Aspen Plus
MATLAB is a high-level technical computing language What Does Aspen Stand
For?
Programming
MATLAB enables you to perform computationally intensive Basics
Programming
MATLAB has several advantages over other methods or Basics
languages: MATLAB Fundamentals
Basics of MATLAB
It is user - friendly. Matrices and Vectors
Introducing Aspen Plus
Tasks can be accomplished with a single function call. What Does Aspen Stand
For?
What is Aspen Plus
It contains large number of built-in functions. process simulation model?
Programming
Basics
MATLAB Fundamentals
Basics of MATLAB
Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
For?
What is Aspen Plus
process simulation model?
Tsegay G.
Current Directory Browser
Programming
The directory (folder) that MATLAB is currently Basics
MATLAB Fundamentals
working in.
Basics of MATLAB
This is where anything you save will go by default, Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
You won’t be able to run a script that you saved that For?
What is Aspen Plus
you saved in a different directory (unless you give the process simulation model?
Tsegay G.
Current Directory Browser
Programming
The directory (folder) that MATLAB is currently Basics
MATLAB Fundamentals
working in.
Basics of MATLAB
This is where anything you save will go by default, Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
You won’t be able to run a script that you saved that For?
What is Aspen Plus
you saved in a different directory (unless you give the process simulation model?
Command Window
used to enter commands at the command line, indicated
by the prompt (>>)
used to run a program you have written for MATLAB
helpful to use MATLAB as a calculator and a graphing
tool
Programming
Workspace Browser Basics
MATLAB Fundamentals
It is empty at startup
Basics of MATLAB
Programming
Workspace Browser Basics
MATLAB Fundamentals
It is empty at startup
Basics of MATLAB
The help browser and edit window are open by using menu
selection on the command window.
Tsegay G. (EiT-M) CAPD&S November 20, 2018 9 / 29
The Help Browser CAPD&S
Tsegay G.
Use the Help browser to search and view documentation
and demonstrations for MATLAB and all other installed Programming
Basics
Math Works products. MATLAB Fundamentals
Click on the Help tab on the top tool bar or click on the Basics of MATLAB
Matrices and Vectors
help browser icon in the main MATLAB window. Introducing Aspen Plus
What Does Aspen Stand
For?
The tabs in the Help Window Navigator (shown below) What is Aspen Plus
process simulation model?
provide different ways to search for information:
contents, index, or search.
Tsegay G.
Use the Help browser to search and view documentation
and demonstrations for MATLAB and all other installed Programming
Basics
Math Works products. MATLAB Fundamentals
Click on the Help tab on the top tool bar or click on the Basics of MATLAB
Matrices and Vectors
help browser icon in the main MATLAB window. Introducing Aspen Plus
What Does Aspen Stand
For?
The tabs in the Help Window Navigator (shown below) What is Aspen Plus
process simulation model?
provide different ways to search for information:
contents, index, or search.
Edit Window
Select File − > New − > M-file from the MATLAB
toolbar or click the new file icon to open editor window.
Used to create new and/or edit existing M-files.
A text editor for writing MATLAB programs.
Colors are used to highlight various parts of the
language (e.g. comments, variables, numbers, and
strings.
Tsegay G. (EiT-M) CAPD&S November 20, 2018 10 / 29
CAPD&S
Tsegay G.
Figure Windows
Programming
Used by MATLAB to display graphics: two- or Basics
MATLAB Fundamentals
three-dimensional plots, images, etc.
Basics of MATLAB
Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
For?
What is Aspen Plus
process simulation model?
Tsegay G.
Figure Windows
Programming
Used by MATLAB to display graphics: two- or Basics
MATLAB Fundamentals
three-dimensional plots, images, etc.
Basics of MATLAB
Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
For?
What is Aspen Plus
process simulation model?
Programming
Basics
MATLAB Fundamentals
Basics of MATLAB
Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
For?
What is Aspen Plus
process simulation model?
Programming
Arithmetic operations Basics
MATLAB Fundamentals
2 Subtraction -
3 Multiplication *
4 Element-wise multiplication .*
5 Division /
6 Element-wise division ./
7 Left division \
8 Left element- wise left division .\
9 Exponentiation ^
10 Element-wise Exponentiation .^
For example, you can compute the sum of the square of Matrices and Vectors
Introducing Aspen Plus
answer and six times answer as follows: What Does Aspen Stand
For?
What is Aspen Plus
ans =
22.5000
ans 2 + 6 ∗ ans + 5
ans =
646.2500
Errors in Input
If you make an error in an input line, MATLAB will
normally print an error message. For example, here’s
what happens when you try to evaluate :
Tsegay G. (EiT-M) CAPD&S November 20, 2018 14 / 29
Built-in Functions CAPD&S
Tsegay G.
MATLAB has many built-in functions.
Common built-in functions are given in the table below. Programming
Basics
MATLAB Fundamentals
Basics of MATLAB
Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
For?
What is Aspen Plus
process simulation model?
Programming
Basics
MATLAB Fundamentals
MATLAB also has several built-in constants, including Basics of MATLAB
pi (the number Π), i (the complex number ), and Inf Matrices and Vectors
Introducing Aspen Plus
Basics of MATLAB
To display different digits or formats we use the Matrices and Vectors
Introducing Aspen Plus
following format commands: What Does Aspen Stand
For?
What is Aspen Plus
process simulation model?
ans = 12.345678901234567;
Programming
Basics
MATLAB Fundamentals
Separate entries within a row by spaces and separate Introducing Aspen Plus
What Does Aspen Stand
For?
rows using semicolons. What is Aspen Plus
process simulation model?
containing a 2x3 matrix, but MATLAB will not echo Basics of MATLAB
Matrices and Vectors
Programming
Basics
In MATLAB, there are two basic ways to define such vectors MATLAB Fundamentals
Basics of MATLAB
1 Using colon (:) Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
For?
The syntax is x =xstart: increment: xend What is Aspen Plus
process simulation model?
Programming
Basics
MATLAB Fundamentals
Basics of MATLAB
Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
For?
What is Aspen Plus
process simulation model?
Programming
Basics
MATLAB Fundamentals
Basics of MATLAB
Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
For?
What is Aspen Plus
process simulation model?
Programming
Basics
MATLAB Fundamentals
Programming
Given reliable thermodynamic data, sensible operating Basics
conditions, and rigorous equipment models, Aspen Plus can MATLAB Fundamentals
The goal of applying such treatment steps is basically to add What Does Aspen Stand
For?
a value or convert the raw, cheap material(s) into valuable, What is Aspen Plus
process simulation model?
can fetch these components from Aspen Plus data What Does Aspen Stand
For?
platform.
2 Specify thermodynamic models to represent the physical
Programming
Basics
MATLAB Fundamentals
We can deliberately change any of the specifications listed in Basics of MATLAB
results with the old (previous) results, and then decide What is Aspen Plus
process simulation model?
Tsegay G.
Programming
Basics
MATLAB Fundamentals
Basics of MATLAB
Matrices and Vectors
Introducing Aspen Plus
What Does Aspen Stand
For?