Announcements |
|
There
are several mathematical computation tools. The most common
are: MATLAB, Mathematica, Mathcad and Maple. You may have
seen Maple in your calculus courses, and most probably most
of you will be using MATLAB in your future engineering classes.
MATLAB
is a powerful commercial package, which handles very well
problems that can be written in terms of arrays. In fact the name MATLAB stands for
MATrix LABoratory. Matrix
is a mathematical name for two-dimensional arrays of numbers,
which obey certain basic rules of operations.
You will eventually have a course that rigorously examines
matrices and their applications. Here we will see an introduction
to these ideas.
For information
about the company maintaining MATLAB look at : http://www.mathworks.com/products/matlab/
.
|
|
|
Reading
Assignments |
|
Book
2 : Pages 16 - 59
We
suggest that you also use the help facility of MATLAB.
|
|
|
|
Subtopics
Notes/ Examples:
|
|
|
Tasks:
|
- Activate
MATLAB and define arrays a = [ 1.2, 3.4, 0.456, 7.8] & b =
[ 2.9, 8.7, 5.01, 7.003]
- Calculate
a + b , a - b , and a .* b .
- Using
arrays in MATLAB plot the function y = 3 x2 + 5 x -
4 over the interval -1 to +1.
- Try
the same task for the function y = 2 sin( p( x + 0.25)) + 1.2
- Enhance
both plots with titles and axes information
- Using
the editor create a data file called mex1.txt which has 4 lines
of floating point numbers with 3 numbers per line. Save the file
and subsequently load it to MATLAB. Then create three arrays v1,
v2, v3, which correspond to the 3 columns of the data file. Write
the first two arrays to a file called report.txt
- Write
a MATLAB program (m file), which calculates the average of three
numbers entered by the keyboard.
The program should prompt for the three numbers.
|
|
|
|
|
|
Jacob
Y. Kazakia © 2001 All rights reserved
|
|