Colon notation
Getting sub-arrays
Array Building Functions
Loops
Examples solved
Lecture-1.4
Scripts and Functions
MATLAB files are of 2 types
Scripts
Functions
A script file
hold on;
This command is used to retain the previous curves on the graph window. If we
dont use this command and call plot function again, the previous plot will be
overridden.
We dont have to type this command again and again. Type only once and then
every time I call plot, all previous curves will be retained.
Lecture-2.1
Errors
o Truncation Errors
o Round-off errors
Machine precision
Every machine has a certain precision. Precision is similar to
least count of a machine. A rule has a least count of 1mm and
a Vernier caliper has a least count of .1mm or 0.01cm. So it
has a better precision. Often precision and the least count are
used interchangeably.
Similarly, a computer has a certain precision. This means that
between number k and k+, no number exists. Machine
precision depends on the number of bytes we use to store a
real number.
A standard real number uses 4 bytes. A double precision uses
8 bytes for its storage. So it will have a better precision.
For more info, look for Computational Techniques course.
In MATLAB, the machine precision is given by esp. The mantissa has 52 bits in it.
The precision is 2*10^-52
Lecture-2.2 (not clear)