M2 +Fundamental+of+Computer-Aided+Mathematical+Calculations
M2 +Fundamental+of+Computer-Aided+Mathematical+Calculations
Intended Learning Outcomes : At the end of this lesson, you should be able to :
1. Identify some computer softwares used in numerical calculations
2. Perform basic commands in GNU Octave
3. Perform matrix operations using GNU Octave
Discussions :
1. What are some the most common softwares used mathematical calculations?
Microsoft Excel - Microsoft Excel is a helpful and powerful program for data analysis and
documentation. It is a spreadsheet program, which contains a number of columns and rows, where
each intersection of a column and a row is a “cell.” Each cell contains one point of data or one piece
of information. By organizing the information in this way, you can make information easier to find,
and automatically draw information from changing data.
Source : https://itconnect.uw.edu/learn/workshops/online-tutorials/microsoft-office-2010/microsoft-excel-2010/
Scilab - Scilab is a scientific software package for numerical computations providing a powerful
open computing environment for engineering and scientific applications.
Source : https://alternativeto.net/software/gnu-octave/
Maple - Maplesoft’s renowned desktop software, Maple offers the most powerful and
comprehensive environment for exploring, visualizing, and solving even the most difficult math
problems
Especially good for: Anyone working with advanced math, including educators and students
in upper year courses and math-heavy programs; researchers; programmers; technical content
creators, or anyone who wants access to everything, just in case they need it later.
Source : https://www.maplesoft.com/products/maple/math-suite-education/index.aspx
GNU Octave - Octave is a computer program for performing numerical computations which is
mostly compatible with MATLAB. It is part of the GNU Project. It is free software under the terms
of the GNU General Public License.
GNU Octave is a high-level interpreted language, primarily intended for numerical
computations. It provides capabilities for the numerical solution of linear and nonlinear problems,
and for performing other numerical experiments. It also provides extensive graphics capabilities for
data visualization and manipulation. The Octave interpreter can be run in GUI mode (new in
version 4.0.0), as a console, or invoked as part of a shell script. Octave is normally used through its
interactive interface, but it can also be used to write non-interactive programs.
Source : https://alternativeto.net/software/gnu-octave/about/
Command Window – Commands are written here. Results are displayed here.
Workspace – Variables and Matrices can be seen here.
Command History – Previous commands can be viewed here.
[ ]
12 4
A= 3 8 6
51 7
>> B = [1, 2, 3; 0, 2, 0; 5, 1, 2]
[ ]
123
B= 0 2 0
512
3.2 Determinant of a Matrix
To calculate the determinant of matrix A and store it in variable D. Use the syntax below
Example :
>>D = det(A)
[ ][ ] [ ]
1 2 4 x1 8
>>b = [8; 20; 18] (column matrix) 3 8 6 x2 = 20
>>x = A\b 5 1 7 x3 18
[ ][]
x1 2
x2 = 1 , answer
x3 1
[ ]
223
[ ]
−1 2 4
A= 3 2 5 B= −3 8 6
512 −5 1 7
Capture the screenshot to show your work.
1. Use GNU Octave to perform the indicated operations.
a. AxB
b. A+B
c. det(A)
d BT
2. Plot the function y = cos(x) (-π< x < π).
Choose an increment to produce a "smooth-looking curve"
References :
1. Applied Numerical Methods with MATLAB for Engineers and Scientist
Steven C. Chapra, McGraw Hill International Edition 2005
3. https://octave.org/doc/v4.0.0/Two_002dDimensional-Plots.html