Professional Documents
Culture Documents
Lecture # 4_1
MATLAB Basics
• Current Directory
– View folders and m-files
• Workspace
– View program variables
– Double click on a variable
to see it in the Array Editor
• Command History
– view past commands
– save a whole session
using diary
MATLAB User Environment
Workspace/Variable
Inspector
Command Window
Command History
Data Types
Data Types Characteristics
int a;
double b;
float c;
• All variables are created with double precision unless
specified and they are matrices.
Example:
>>x=5; • After these statements, the variables
>>x1=2; are 1x1 matrices with double precision
2. Functions
MATLAB includes hundreds
of functions for:
• Data analysis and visualization,
• Numeric and symbolic computation,
• Engineering and Scientific graphics,
• Modeling, simulation, and prototyping,
• Eigenvalue, singular value
3. Vectors and Matrices
MATLAB works with scalars,
vectors and matrices:
• Basic matrix operations,
• Inverses of matrices,
• Graphs of matrices,
• Matrix manipulation,
• Programming, application
development, and GUI design
4. Graphics
MATLAB has remarkable
graphics capacities:
• 2-D and 3-D plots,
• Line plotting,
• 3-D surface plot,
• Splash screen plot,
• Plot of complex functions and ...
MATLAB Demos
• Demonstrations are
invaluable since they
give an indication of
the MATLAB
capabilities.
• A comprehensive set
are available by
typing the command
>>demo in MATLAB
prompt.
MATLAB Demos
MATLAB has remarkable graphics
capacities, 3_D plots are some of
them:
• 3-D plots in Handel Graphics
• Plot Type,
• Shading,
• Colormap,
• Axis and ...
MATLAB Demos
MATLAB has many toolboxes:
• Control toolbox is one of the
important toolbox in MATLAB.
• RLC Circuit Response,
• Gain and Phase Margins,
• Notch Filter Discrete,
• PID and ...
MATLAB Demos
MATLAB has many toolboxes:
• Signal Processing toolbox is one of
the important toolobx in MATLAB.
• Designing Filter,
• Filtering a Signal,
• Discrete and Continuous Fourier
Transform,
• Spectral Analysis and ...
MATLAB Demos
• Simulink has the ability to simulate a large range
of systems, from very simple to extraordinarily
complex. The Model and demonstrations that you
will see in this section include both simple and
complex systems.
Simulink has the ability to simulate a large range of
systems, in the menu of Simulation we have:
• Pause
• Stop
• Simulation Parameters
• Start