Você está na página 1de 40

Engineering Computation

ENGR 2304
Syllabus and Introduction

Course Objectives

To introduce and reinforce the use of problem-solving methodology as


practiced by the engineering profession in general and as applied to the use of
computers to solve some problems in particular.

Course Objectives
After successful completion of the course, the following objectives should be attained:

1. Demonstrate qualitative and quantitative understanding of the use Excel


Spreadsheet.
2. Develop a working knowledge of the required mathematical solution procedures for
engineering analysis.

3. Demonstrate the use of spreadsheets to solve a variety of engineering problems.


4. Ability to use Excel built in features to solve all engineering problems.

5. Ability to use MATLAB to reinforce the use of problem-solving methodology as


practiced by the engineering profession and as applied to the use of computers to
solve problems.

Class Session
Class session is every Tuesday and Thursday : 8AM-10.40AM
Each session consists of :
- Slide discussion
: 30 minutes*
- Exercise
: 30 minutes*
- Task
: 100 minutes*
*Time allocation isnt final and may be subjected to change

Class Session
There will be no homework
However, at the end of the class, you will be given the next
sessions power point presentation file for you to study
before the next class session.

Make sure you study it before the class because I will not
show you the whole slides again.

Class Session

Any other class rule youd like to add?

Evaluation Components
-

Mid Exam 1
Mid Exam 2
Final Exam
Daily Task*

:
:
:
:

25%
25%
25%
25%

*There will be no make-up session for daily task. Late submission will
not be accepted under normal circumstances. Exception will only
applied for those who are sick.

Reference Book

- MATLAB for Engineers 3rd edition by Holly Moore

Course Syllabus
Week 1 : (1 & 3 Mar)
Week 2 : (8 & 10 Mar)
Week 3 : (15 & 17 Mar)
Week 4 : (22 Mar)
Week 5 : (29 & 31 Mar)
Week 6 : (5 & 7 Apr)
Week 7 : (12 & 14 Apr)
Week 8 : (19 & 21 Apr)
Week 9 : (26 & 28 Apr)
Week 10: (3 May)
Week 11: (10 & 12 May)
Week 12: (17 May)

: Introduction to MATLAB and MATLAB environment


: Functions and Matrices
: Plotting
: Mid Exam 1
: User-defined Functions
: User-controlled Input and Output
: Logical Functions and Selection Structures
: Repetition Structures and Mid Exam 2
: Matrix Algebra and Other Kinds of Arrays
: Symbolic Mathematics and Numerical Techniques
: Advanced Graphics, GUI, and Microsoft Excel
: Final Exam

Intro to MATLAB
Chapter 1

Objectives
After studying this chapter you should be
able to:
Understand what MATLAB is and why it is
widely used in engineering and science
Understand
the
advantages
and
limitations of the student edition of
MATLAB
Formulate problems by using a structured
problem-solving approach

Whats in this Chapter?


What is MATLAB?
How is MATLAB used in
industry?
Problem Solving in Engineering
and Science

Section 1.1
What is MATLAB?
MATLAB is one of a number of
commercially available, sophisticated
mathematical computation tools
Others include
Maple
Mathematica
MathCad

MATLAB excels at:


Numerical calculations
Especially involving matrices

Graphics
MATLAB stands for
Matrix Laboratory

Why MATLAB

Easy to use
Versatile
Built in programming language
Not a general purpose language like
C++ or Java

MATLAB was originally

written in Fortran, then later


rewritten in C

MATLAB 7
MATLAB is updated regularly
Versions that predate
MATLAB 5.5 are substantially
different

Section 1.2
How is MATLAB used in Industry?
Widespread, especially in the signal
processing field
Tool of choice in Academia for most
engineering fields
Some examples.

Electrical Engineering

These images simulate the visual system used in a housefly


brain to detect collisions. The techniques developed are
being used in autonomous robot systems that depend upon
vision for navigation. The data was processed using MATLAB

Biomedical Engineering

These images were created from MRI scan data using MATLAB.
The actual data set is included with the standard MATLAB
installation, allowing you experiment with manipulating the data
yourself.

Fluid Dynamics

Results from a finite element analysis code were post processed


using MATLAB to create this image.

Section 1.3
Problem Solving in Engineering and
Science

1.
2.
3.
4.
5.

State the Problem


Describe the input and output
Develop an algorithm
Solve the problem
Test the solution

State the Problem


If you dont have a clear
understanding of the problem, its
unlikely that youll be able to solve it
Drawing a picture often helps you
understand the system better

Describe the Input


and Output

Be careful to include units


Identify constants
Label your sketch
Group information into tables

Develop an Algorithm
Identify any equations relating the
knowns and unknowns
Work through a simplified version of
the problem by hand or with a
calculator
Developing a flow chart is often
useful for complicated problems

Solve the problem


Create a MATLAB solution
Be generous with comments, so that
others can follow your work

Test the Solution


Compare to the hand solution
Do your answers make sense
physically?
Is your answer really what was asked
for?
Graphs are often useful ways to
check your calculations for
reasonableness

If you use a consistent problem solving


strategy you increase the chance that
your result is correct
Heres an example.

Example 1.1
Albert Einstein
E=mc2
The sun is fueled by
the conversion of
matter to energy
How much matter
does the sun consume
every day?

State the Problem


Find the amount of matter necessary to
produce the amount of energy radiated
by the sun everyday

Describe the Input


and Output
Input
Rate of energy radiation
E = 385*1024 Joules/second

Speed of light
c = 3.0*108 meters/second

Output
Mass in kilograms

Develop an Algorithm Hand


Example
The energy radiated in one day is:
J
sec
hours
385 10
3600
24
*1day 3.33 10 31 J
sec
hour
day
24

Rearrange E=mc2 and solve for m


m=E/c2
m

3.33 10 31 J

3.0 10 m / sec
8

J
3.7 10
m 2 / sec 2
14

But the units are wrong!!


J
3.7 10
2
2
m / sec
14

1 J = 1 kg m2/sec2
2

kg m / sec
14
3.7 10
3.7 10 kg
2
2
m / sec
14

Develop a MATLAB Solution to


Solve the Problem
Well start learning the details of
how to use MATLAB in the next
chapter.
However, you can see from the
following demonstration just how
easy it is to use the command
window

Test your Solution


Matches the hand solution
Is it reasonable?
Consider
Mass of the sun = 2*1020 kg
How long would it take to consume all
that mass?

time = (mass of the sun)/(rate of consumption)


2 10 30 kg
year
13
time
*

1
.
5

10
years
14
3.7 10 kg / day 365days

Thats 15 trillion years!!


Yes this is a reasonable
result

Summary
MATLAB is widely used
MATLAB is easy to use
A systematic problem solving
strategy makes it more likely youve
found the right answer

1st Task

Please write an email to :


martinus.dewa@sampoernauniversity.ac.id

The email address you use will be registered for this course
task submission and announcement for the entire semester.

Please write the subject: ENG-COMP : Intro

In the email body, please write your Full name, NIM, and tell
me your hobby and your favourite stuff (Favourite movie,
video games, musician, etc)

Have you done any programming before? If Yes, please tell me


the programming language youve already learned.

Any
Questions

Você também pode gostar