Documente Academic
Documente Profesional
Documente Cultură
Introduction to MATLAB
Desktop
High Level
Languages such as
C, Pascal etc.
Assembly
Official Website:
www.mathworks.com
or
Advantages of MATLAB
• Ease of use
• Platform independence
• Predefined functions in varied domains
• Integrates Programing, Plotting, Simulation and
Hardware Interface
Disadvantages of MATLAB
• Can be slow
• Commercial software
>> a = 2
>> b = 4;
>> c = b+a^2
Row 1
Row 2
Row 3
arr(3,2)
Row 4
>> x = 10;
-----------------simple.m--------------------
x = 10;
y = x/4;
z = y*9;
------------------------------------------------
This can be executed in command space in the following
manner (assuming the file is in the current working directory):
>> simple
+ addition
variable_name = expression :
>> x = 3 * 2 + 6 / 2
x =
9
Programming in MATLAB Authors: Ram N. Patel & Ankush Mittal
The parentheses ( ) are used in complex operations. Other
braces (such as { } and [ ] ) are reserved for special
purposes in MATLAB. Here are some examples of writing
simple expressions:
… Continuation
% Comments
Programming in MATLAB Authors: Ram N. Patel & Ankush Mittal