Sunteți pe pagina 1din 17

ENG004

ALGORITHMS &
INT. TO PROGRAMMING

Week 2
“Exploring MATLAB”
Ahmet Anıl Dindar
28.02.2007
The class facts

 E-mail address: iku.eng004.01@gmail.com

 Class web page:


http://web.iku.edu.tr/courses/insaat/eng004/

ENG004.01 2
Last week

 The syllabus was distributed.


 The facts about the class was mentioned
 The class e-mail was introduced and the
students were asked to send a registration
mail to the class e-mail.

ENG004.01 3
This week

 What is Algorithm and Programming?


 Why do we need programs?
 A powerful tool- MATLAB
 What is MATLAB?
 Why MATLAB?
 HOw to use it? The first commands in
MATLAB.

ENG004.01 4
Algorithm and Programming

 The best way to do some work is to know


how to do it.
ALGORITHM

Some examples to
Algorithm

ENG004.01 5
Programming

 How to make a machine to perform the


algorithms?
PROGRAMMING

How to program?

ENG004.01 6
You need some tools to make the
machine perform your algorithms
 Basic
 Pascal
 C,C++
 Java
 Perl
 ...

ENG004.01 7
MATLAB

 MATLAB (MATrix LABoratory) is a powerful


program based on C++ and JAVA
applications.
 It has wide range of command library.
 Almost every engineering student in USA
uses MATLAB.
 Most of the Turkish Universities started
teaching MATLAB in introductory classes.

ENG004.01 8
MATLAB and Columns-Beams?
What is the relationship?
 MATLAB in Civil
Engineering?
 Do we need it?
 Does any Civil Engineer
use MATLAB in work?
 Have you ever seen any
Civil Engineer using
MATLAB?

ENG004.01 9
And now let’s see
How MATLAB looks?

Follow me now!

ENG004.01 10
Let’s do some Calculations

 The 4 basic calculation


 1+2
 5-1
 15*2
 8/4
 (1+2)*5-1

ENG004.01 11
Gauss Number
 1+2+3+...+100=?

1  2  3  ....  n 
 n    n  1
2

 Let’s use MATLAB

>>
100*(100
+1)/2
ans =
5050
>>

ENG004.01 12
Assignment #1
 Please do the following calculations in
MATLAB
>> 10*(10+1)/2

>> (10+50)*(10+20)/10

>>10*(10+1)+(10+1/2)*(58+1)

>>25/2+8-9

>>8+9*9-5
Are there any difference between
>> 8+9*(9-5)
these calculations?
>> (8+9)*9-5

ENG004.01 13
Send your diary files to class e-mail

ENG004.01 14
Next week...
Weeks Date Class Assignment

1 21.02 Introduction to the class Registration

2 28.02 Exploring MATLAB Assignment 1

3 07.03 Arrays and Matrix Operations N.A.

4 14.03 Arrays and Matrix Operations Assignment 2

5 21.03 Arrays and Matrix Operations Assignment 3

6 28.03 Polynomials and curve-fitting Assignment 4

7 04.04 Descriptive statistics Assignment 5

8 11.04 Programming Elements of MATLAB N.A.

9 18.04 Programming Elements of MATLAB Assignment 6

10 25.04 Programming Elements of MATLAB Assignment 7

11 02.05 Plotting and Animations N.A.

12 09.05 Plotting and Animations Assignment 8

13 16.05 Numerical Integration Assignment 9

14 23.05 Symbolic Math Assignment 10

15 30.05 Take-home final project N.A.

ENG004.01 15
See you next week!

ENG004.01 16
ENG004.01 17

S-ar putea să vă placă și