EXPERIMENT # Introduction To MATLAB Title: Electric Circuit Theory Laboratory (PC - EE 391)
EXPERIMENT # Introduction To MATLAB Title: Electric Circuit Theory Laboratory (PC - EE 391)
TITLE
Familiarization with and Tutorial on MATLAB Package Software.
OBJECTIVE
1. To know what it is.
2. How to invoke and quit the system.
3. Basics of programming.
4. Different Commands.
FAMILARISATION
Matlab is a commercial package and stands for "Matrix Laboratory" which operates as an
interactive programming environment.
Matlab is a tool for doing numerical computations with matrices and vectors. It can also display
information graphically. The best way to learn what Matlab can do is to work through some
examples at the computer.
To start MATLAB on Windows double click MATLAB shortcut icon on the desk-top or click
STARTclick Program click Matlab I When run MATLAB is run under the window system,
whether started from the menu or a system prompt, a small MATLAB logo window will pop up
while the program is loading and disappear when MATLAB is ready to use.
Matlab has many types of matrices which are built into the system, i.e., rand, zreos, ones, eye
etc.
MATLAB is also a programming language. By creating a file with the extension .m programs
can be easily written and run. If to create a program file myfile.m in the MATLAB language, then
to make the command myfile from MATLAB and it will run like any other MATLAB function.
Some MATLAB function descriptions
zeros - Zeros matrix.
ones - Ones matrix.
eye - Identity matrix.
rand - Uniformly distributed random numbers.
Ans - Most recent answer.
pi - 3.1415926535897....
i, j - Imaginary unit.
inf - Infinity.
sin - Sine.
>> min(a)
ans =
1 2 3
>> c= [b r]
c=
2 6 8 8
2 5 9 9
1 7 4 7