Mod1 Part3
Mod1 Part3
Mod1 Part3
environment mainly used for numeric computation, programming, and visualization. It has been
developed by MathWorks. The basic functions of Matlab are plotting of functions and data, the
creation of user interfaces, matrix manipulations. It also provides support for interfacing with other
programming languages in C, C++, Fortran, and Java. Besides, it is also used to analyze data,
create models and applications, and also develop algorithms. Along with all this, introduction to
Matlab also provides numerous built-in functions for mathematical operations involving numerous
calculations, performing numerical methods, generating plots, and a lot of other functions. Matlab
also has a very good scope in the automotive domain using Rapid control Prototyping or RCP used
components of Matlab. Matlab provides a lot of functionalities that can help in computational
mathematics. Below are the most common functions and mathematical calculations used in Matlab
3. Linear Algebra
4. Algebraic Equations
5. Non-linear Functions
6. Statistics
7. Data Analysis
9. Numerical Calculations
10. Integration
11. Transforms
Characteristics
Matlab is a versatile tool designed for computational mathematics and supports lots of other
operations. Below given are a few of the characteristics that make Matlab an intelligent tool –
1. Matlab contents are a huge library of built-in functions providing support for various
numerical computation.
3. Matlab provides support for creating custom plots and data visualization with its built-in
4. Matlab also supports an iterative environment helping to design and problem solving along
5. Matlab provides integration support with other languages like C, Java, Microsoft Excel,
6. With its uniquely designed programming interface, Matlab helps its users with
Applications of Matlab
As we discussed in the introduction to Matlab, we will now learn about Matlab’s applications
which are as follows: Matlab is widely used in the industry as a tool for mathematical computation
and different streams of studies like physics chemistry, engineering, mathematics, Etc. The various
1. Computational Finance
2. Control systems
6. Computational biology
Advantages of Matlab
Below are the advantages of Matlab:
1. Matlab is a compiler-independent tool and doesn’t require any compiler to execute like as
required in C, C ++. Codes are written in sentences and executed one by one.
4. Matlab coder is used to converting the code that is written in Matlab to Java, Python, C++,
5. Different languages can be used to implement scientific theories, and after building the
library files or .dll files, those can be directly implemented in Matlab using other languages.
6. The inbuilt rich library of Matlab contains a library of the neural network, power system,
using this reach library, it is always easy to develop and implement any scientific
simulation. These tools can be controlled by using built-in codes so that any manual
7. Complex mathematical operations like matrix multiplication and addition can be easily
8. Matlab also supports loops by using the length of code same or even shorter as compared
9. Matlab also supports the writing of user-defined functions, which are extremely easy to
implement and also can be stored in separate files for future use. This potentially saves a
lot of time writing the same code which is needed for different operations and functions in
regular use.
10. Matlab allows the import and export of data to or from a text or excels file using a single
command which is very useful for analysis of previously recorded data. Matlab allows
11. Data can also be saved in variables with very simple commands, which are easy to use by
12. Matlab also gives a feature to use GUI or graphical user interface using add and drop boxes.
On programming the proper functions of the code by using a graphical user interface, the
code is automatically generated by the program. The compilation of the code is also very
14. Matlab also provides REPL – read, evaluate, print, loop or interactive environment to do
Disadvantages of Matlab
Below are the disadvantages of Matlab:
1. Cross-compiling of Matlab code to other languages is very difficult and requires deep
2. Matlab is used mainly for scientific research and is not suitable for development activities
5. Matlab is more expensive. The license is very costly, and users need to buy each and every
6. Matlab is not known to create application deployment for installation like the task done by
others which includes the setting of files another executable that copies during installation.
Applied MATLAB
MATLAB Capabilities
Industrial MATLAB
MATLAB INTERFACE
Command Window:
In this window one must type and immediately execute the statements, as it requires quick
prototyping. These statements cannot be saved. Thus, this is can be used for small, easily
executable programs.
Editor (Script):
In this window one can execute larger programs with multiple statements, and complex
functions These can be saved and are done with the file extension ‘.m ‘
Workspace:
In this window the values of the variables that are created in the course of the program (in
the editor) are displayed.
This window displays the exact location(path) of the program file being created.
Writing a MATLAB program:
1. Using Command Window:
Only one statement can be typed and executed at a time. It executes the statement when the
enter key is pressed. This is mostly used for simple calculations.
Note: ans is a default variable created by MATLAB that stores the output of the given
computation.
2. Using Editor:
Multiple lines of code can be written here and only after pressing the run button (or F5) will
the code be executed. It is always a good practice to write clc, clear and close all in the
beginning of the program.
Note: Statements ending with a semicolon will not be displayed in the command window,
however, their values will be displayed in the workspace.
Any statement followed by % in MATLAB is considered as a comment
3. Vector Operations:
Operations such as addition, subtraction, multiplication and division can be done using a
single command instead of multiple loops
SIMULINK
The workflow in this tutorial focuses on fundamental Simulink® tasks as they relate to Model-
Based Design.
System Definition and Layout — Identify modeling goals, determine components, model
system layout.
Model and Validate a System — Model and test components, integrate components, test system.
Design a System in Simulink — Design and test new components.
The first two tasks in this workflow model an existing system and establish the context for
designing a component. The next step in this workflow would be to implement the new component.
You can use rapid prototyping and embedded code generation products, such as Simulink Real-
Time™ and Embedded Coder®, to generate code and use the design with a real, physical system.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: