First program…the start to MATLAB atmosphere…
Matlab as a calculator
Have you ever wondered how the scientist makes the
precise calculations up to 20 decimal points or how difficult calculations of
the eigen value of the matrix of higher orders, etc., etc.
Here I present you the first and very basic use of the
Matlab, which 3 in every 5 students are fear off, i.e. calculations. The basic
calculations involves addition, subtraction, multiplication, division, square
root, etc.
I assumed that now you have good knowledge of different
kind of Matlab windows, i.e. how to differentiate different windows.
When you first start Matlab, you will find “>>”
symbol in the command window which means you can write whatever you want to
write but remember since this software is Matrix based so all the program
should be liable and applicable for Matrix.
These are command for some of the basic operations
1) >>
20+30 ‘Press enter’
ans =
50
2) >>
30-20 ‘Press enter’
ans =
10
3) >>
10*5 ‘Press enter’
ans =
50
4) >>
10/5 ‘Press enter’
ans
=
2
5) >>
10\5 ‘Press enter’
ans =
0.5000
Symbol
|
Name of operation
|
+
|
Addition
|
-
|
Subtraction
|
*
|
Multiplication
|
/
|
Forward
division
|
\
|
Backward
division
|
Table:
- Symbols and their meaning
P.S:- I
would like to advise you that try the above function by your own as well as it
help you to learn faster.
Hope to see you in next tutorial…!!!!
Written By,
Student Dheeraj Mor VIT University