Presentation is loading. Please wait.

Presentation is loading. Please wait.

Winter Semester 2014/2015 College of Engineering.

Similar presentations


Presentation on theme: "Winter Semester 2014/2015 College of Engineering."— Presentation transcript:

1 Winter Semester 2014/2015 College of Engineering

2 Syllabus Instructor: Prof. M. Asif - Room 2B45 - Tel: 011-467-6849 Email: masif@ksu.edu.sa Credit hours: 3 Office Hours: see office hours schedule posted Goals Learn the fundamentals of programming using Matlab Textbooks & reference materials Amos GILAT, MATLAB an Introduction with Applications, John Wiley&Sons Inc. 4 th Edition Hoboken, New Jersey, USA 2011 David Houcque, Introduction to Matlab for engineering students, class- notes,Northwestern University. (version 1.2, August 2005) Tools: The required software and hardware will be available in the college of engineering computer labs.

3 Syllabus : Outline WeekTopics 1 – 2 INTRODUCE  Introduction to programming  Introduction to the MATLAB environment  Introducing the command window, the script editor 3 – 4 USING THE MATLAB ENVIRONMENT  Data types, Constants, Variables  Operators and Built-In Functions, assignment statements  Types of errors 5 – 6 ALL ABOUT ARRAYS  Arrays in MATLAB  Matrices and matrix operations 7-8 ALL ABOUT PLOTTING  Plotting with MATLAB  Managing plots  Multiple plots  (MID-TERM EXAM)

4 Syllabus : Outline WeekTopics 10 – 11 WRITING PROGRAMS IN SCRIPT FILES  Script Files / Data files  Program composition and format  Algorithms  Simple Input/Output  Formatted output 9 – 10 CONTROL TECHNIQUES  IF constructs  FOR loops  WHILE loops 12 – 14 GOING BEYOND  Programming with functions  Applications

5 Syllabus : Grading  Computer Labs  (15%)  In-class instructor’s grades  (15%)  Mid-term exams  (30 %)  Final exam  (40 %) Important note : The Mid-Term Exam for GE 209 will be held on XXXX, XXXXXXX( ( إن شاء الله This date is reserved for all sections (GE209) and in no way it will be changed !!!

6

7 7 MATLAB Resources (latest Release R2014b) Getting Started – html document on Mathworks web site –http:/www.mathworks.com/access /helpdesk/help/helpdesk.shtml –Click on “Getting Started” –Click on “This manual in PDF” Open or save to disk http://www.mathworks.com/help/matlab/ Help from MATLAB program Practice and learn from each other http://www.mathworks.com/videos/gettin g-started-with-matlab-68985.html

8 8 A snap shot of the MATLAB working environment Command Window Command History Workspac e Command Window type commands Current Directory View folders and m-files Workspace View program variables Double click on a variable to see it in the Array Editor Command History view past commands save a whole session using diary

9 The Commands Window Command Window Recognizable by the Command prompt >> Basic arithmetic operations are available: addition + subtraction – division / multiplication * exponentiation ^ More complex operations and programming instructions Pressing “enter” key  “executes” or “runs” or “invokes” the operation

10 Arithmetic Operations Addition + >> 1+2 Subtraction->> 3-4 Multiplication*>> 5*6 Division/>> 7/8 Back Slash\>> 9\10 or 10/9 Exponentiation^>> 2^3 Priority rule : PEMDAS (Parentheses, Exponentiation, Multiplication, Division, Addition, Subtraction) >> ((2+5)^2+2*2-10/5)  = ?

11 Priority rules Precedence is the order operations are preformed, remember PEMDAS >> ((2+5)^2+2*2-10/5) innermost parentheses is done first 7^2 exponentiation is next 2*2 or 10/5 multiplication or division next (49 + 4 – 2) addition or subtraction next Operations are done from left to right  final result gives 51


Download ppt "Winter Semester 2014/2015 College of Engineering."

Similar presentations


Ads by Google