MAT116E Introduction 2021fall
MAT116E Introduction 2021fall
Fall 2021
By: Burcu Tunga
CONTACT INFORMATION
Homeworks
Submit your homeworks in soft copy through course web
page. (http://www.ninova.itu.edu.tr)
All homeworks must be done individually by yourself.
Grading will be done based on correctness and clarity of
the code and proper execution of the program.
COURSE OBJECTIVES
To familiarize students with the fundamentals of
scientific computing concepts
To develop problem solving skills
To develop skills in constructing an algorithm,
To train students how to use Matlab in scientific and
engineering calculations
To train students to visualize their results and prepare
written reportsTo teach their applications to the solution
of basic problems in analysis and linear algebra.
TOOLS USED TO ACHIEVE THE
OBJECTIVES
Problem Description
Mathematical Model
Problem statement:
– Should be clear and avoid any misunderstanding.
Input/Output Description :
– Information that is given and the values to be computed.
Point 1
Distance
between two
points
Point 2
Example
Hand Example :
p1= (1,5)
p2= (4,7) (4,7)
dist= √ 2 2
( side1 ) +( side2 ) (1,5)
dist side2
√( 4− 1) +(7− 5)
2 2 side1
√13
3.61
Example
/*--This program computes the distance between two points-----*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
main()
{
/*----- Declare and initialize variables----- */
double x1=1, y1=5, x2=4, y2=7;
double side1, side2, dist ;
Compute the lengths of the sides of the right triangle. (side1 and side2).
Matlab (Octave)
Mathematica
Mupad,
Maple
MATLAB
Matlab is designed to solve problems
numerically, that is, in finite precision
Arithmetic.
It produces approximate rather than exact
solutions,
In the latest version it can be also used as
symbolic computation system (SCS)
because of MuPAD.
MATLAB
Matrix-based numeric computation
MATrix LABoratory
The language was invented by Cleve Moler
in the late 1970s
MATLAB is rewritten in C and founded The
Mathworks is founded in 1984 to continue its
development by Cleve Moler and Steve
Bannert.
MATLAB
Advantages
Interpreter
Many many toolboxes
Visualization
Friendly environment
Wide usage
Disadvantages
Slower than C and Fortran
Not freeware
MuPAD
MuPAD is a computer algebra system (CAS).