Professional Documents
Culture Documents
MATLAB/Octave
CES 513 : Computational
Analysis For Engineers (Lab)
Because the
course leader said
so…
What is
Matlab/Octave?
What is a computer
program?
What does computer
programming mean?
What is a
programming
language?
What is code?
What is a computer
program?
In civil engineering…
DATA
PROGRAM RESULT
Concrete
Material Prediction of
Damage data damage index of
a concrete
Do something clever… material
What is a computer
program?
In civil engineering …
DATA
PROGRAM RESULT
Predict whether
the crack is
severe/mild
Concrete damage images damage
Measure length of
crack…
What is a computer
program?
In Administration…
DATA
PROGRAM RESULT
Predict student
performance in
course
Data of students marks
Measure average
marks/highest
marks/student
performance
What does computer
programming mean?
Writing your own computer programs...
… telling the computer to do exactly what
you want.
Excel Photoshop
Using other Writing
+ + people’s
code
+ your own
code
Directory
Workspace
Command history
Octave Command window
Directory
Workspace
Command history
Command window
• A fancy scientific calculator
– 2+3
– 2*3 Any of the text in navy blue is code
– 2/3 you can run in the command
window. Try copy and pasting, then
– 2^3 hitting return
– 2^0.5
– 2+3*6/2
– (2+3)*6/2
• Try using ↑ and ↓
– Select earlier expressions and edit them
Assigning Variables
• Use ‘=‘ to assign variables
– Keeps data in memory to use again
–a=4
–b=3+6
– y = (4*a^2 +3*b^3) / 5
• Can also self-assign:
– b = b*2
• Check the work space
Workspace
syahrul573@uitm.edu.my