Computer Programming

Introduction

This course is designed to expose the students on the development of programming skill using a computer language, which is suitable for the current computer operating system. It will emphasize on the general concept of computer programming that includes steps of problem solving using computer, algorithm and program logic tools, interface design, modularization, arrays, files and graphics. Examples, assignments and group projects related to various civil engineering fields are given to the students. At the end of the course, the student should be able to plan, analyst, and write computer programs for basic civil engineering applications.


Course Outline

Weekly Schedule

Week Topics Download
1 INTRODUCTION TO COMPUTER PROGRAMMING
Introduction to Computers & Programming Process, Program-Development Life-Cycle (PDLC) Logic Design Tools-Flowchart, Pseudocode
2 INTRODUCTION TO MATLAB
MATLAB Environment – Command Window, Workspace, Editor, Managing Files
3 VARIABLES AND OPERATORS
Introduction to Variables, Assignment Statements, Data Types
Built-in Functions, Anonymous Functions
HO – MATLAB as a Calculator – Dealing with Simple Problems
4 Vectors and Matrices – Dimension, Index/Subscript
String Manipulation – Operations on Strings, Converting to Numbers
HO – MATLAB as a Calculator – Dealing with Matrices, Strings
5 INTRODUCTION TO MATLAB PROGRAMMING
Algorithms, MATLAB Scripts – Input and Output, Input/Output using MAT-Files
HO – Creating Simple MATLAB Programs using Script
The plot Function
6 SELECTION STATEMENTS
Relational Expressions – Logical true and false. The if Statement – Nested if, The switch Statement, Data validation
HO – Applying if Statements
7 REPETITIVE STRUCTURES
Counted Loop – for Loop, Nested for Loop
Conditional Loop – while Loop, Vectorizing
HO – Applying for Loop & while Loop
8 USER DEFINED FUNCTIONS
Introduction to User-Defined Functions Modularisation, Subfunction
HO – Applying UDF, Debugging – Tracing Errors
9 Scope of Variables, Workspace
Nested Function
HO – Dealing with Modular Programs & Variables Scope
10 DATA STRUCTURES
Introduction to Arrays & Structures – Passing to Function
Vectors of Structures – Nested Structures
HO – Applying Data Structures
11 DATA & FILE MANAGEMENT
Introduction to Data & Record FilesAccess Methods & Common File Operations
HO – Writing & reading data files
12 Writing Report files
Reading Report files
HO – Writing & Reading Report Files
13 GRAPHICAL USER INTERFACES
Introduction to GUI – How does it work?
Event-Driven Programming using GUI
HO – Dealing with simple GUI
14 callback function for Push Button
Sharing Variables using guidata
HO – Creating GUI – for Previously Developed Programs


Repository