14

About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Embed Size (px)

Citation preview

Page 1: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,
Page 2: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

About Me• Tutor Name: Steven Halim• Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS• Former Teaching Assistant for IT1005, Sem 2, 2007/2008

– IT1005 (Introduction to Programming with Matlab)is a compulsory module for Chemical Engineering students!

– Probably I will teach IT1005 again next (last?) semester

Page 3: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Materials• The ~40 pages note was NOT created by me!• We will be discussing the overview of the materials in that note

– You need to learn the details by reading the note carefully

Page 4: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Objective

• As advertised, this workshop is mainly for students who:– Are new with Matlab, but have to use it for FYP or some course projects, etc– Know basic Math stuffs – Has some programming languages background, e.g. C/C++ (CS1101C/1102C)

• I will share the basic skills necessary to– Understand existing Matlab codes (e.g. passed down by your senior), and– To code some Matlab codes on your own (e.g. to improve existing codes)

Page 5: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Objective… Err…• Err… I am expert with Matlab…

– It is okay… but you will feel bored at the beginning (or most) of this session…– We will only touch tougher topics nearing the end of this session – Alternatively, please help the other participants if they are lost…

• Err… I was your IT1005 student last semester– Err… I will be teaching a compressed IT1005 in this session…

• Err… I do not know Mathematics at all– Err… speechless…

• Err… I have not learned programming at all– It is okay… but you will have harder times in the second half of this session…– Note: You can still use Matlab with just minimal programming skill! – Please use this session to get overview of Matlab!

Page 6: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Be Realistic!• Can I do my FYP (course) project (with Matlab) after this 2 hours session?

– Err… I CANNOT give you the entire Matlab knowledge in 2 hours.– Matlab is a big software…– IT1005 module is conducted over ONE full semester…– To have a sufficient mastery of Matlab, you will need to do a lot of hands on!

• So, what should I do?– Try my exercises and follow up list (see the last slide of this ppt) at home– Bookmark this URL and visit it later:

• http://www.comp.nus.edu.sg/~stevenha/myteaching

Page 7: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Outline• 10-15m Total 10-15m Introduction• 10m Total 20-25m Quick test to gauge your initial skill• 60-75m Total 80-100m Matlab Basics

Common Useful Functions in MatlabControl StructuresMatlab Programming

• 05m Total 85-105m Post test about today’s session• Until end Total 120m A show of Matlab powerful features!

Page 8: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Grade Your Test• I will only tell you the correct answers at the end of this session.• Grade your paper using this guideline:

– If blank 0– If not sure your answer is correct 0– If really sure your answer is correct see the indicated marks

• Total the marks!• Then, keep your test paper until the end of session.

Page 9: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Outline• 10-15m Total 10-15m Introduction• 10m Total 20-25m Quick test to gauge your initial skill• 60-75m Total 80-100m Matlab Basics

– Matrix, Matrix operations

Common Useful Functions in Matlab– Math functions: sin, cos, abs, sqrt, etc– Graphical plots

Control Structures– Sequence, Selection (if/switch),

Repetition (for/while loop)

Matlab Programming– Script or Function (M-files)

• 05m Total 85-105m Post test about today’s session• Until end Total 120m A show of Matlab powerful features!

Page 10: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Teaching Mode• We will use Matlab for these 4 main topics in the next 1-1¼ hour:

– Matlab Basics– Common Useful Functions in Matlab– Control Structures– Matlab Programming

• So, login to the PC in front of you and run Matlab (icon in desktop)!• Follow my explanation and try it directly.• This will be much more meaningful than giving you all theory…

Page 11: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Outline• 10-15m Total 10-15m Introduction• 10m Total 20-25m Quick test to gauge your initial skill• 60-75m Total 80-100m Matlab Basics

Common Useful Functions in MatlabControl StructuresMatlab Programming

• 05m Total 85-105m Post test about today’s session• Until end Total 120m A show of Matlab powerful features!

Page 12: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Other Matlab Features• Common Engineering Problems/Functions in Matlab (or Toolboxes):

– Linear Algebra, e.g. x=A\b– Numerical Methods, e.g. root finding: fzero, fsolve– Symbolic Mathematics, e.g. diff, simplify, pretty– Ordinary Differential Equation (ODE) solvers: Initial Value Problem– Statistics, e.g. mean, std, etc– Function Optimization, e.g. fmincon, fminsearch– Simulation: Simulink

• GUIDE: Create Graphical User Interface in Matlab• Connection with external devices: webcam, microphone, signal, etc• Parallel Computation• And MANY others…

Page 13: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Beyond this Session (1)• Matlab internal help system

– help <the_thing_that_you_want_to_know>

• MathWorks website– Matlab tutorials, demos, webinars, etc

• Other Matlab related websites– Google Search Matlab related keyword (GIYF)

• Books in NUS Libraries– There are a lot of books in our libraries– I searched the term “Matlab” in LINC and got a lot of hits…

Page 14: About Me Tutor Name: Steven Halim Full-time Teaching Assistant and part-time PhD (final year?) in SoC, NUS Former Teaching Assistant for IT1005, Sem 2,

Beyond this Session (2)• Want to use Matlab?

– In NUS, Matlab is available in this Lab, COM1, some other Research Labs…

• Don’t have Matlab at home?– There is an alternative to Matlab…– Do not use illegal copy of Matlab at home!– Use this: GNU Octave (http://en.wikipedia.org/wiki/GNU_Octave)

• My contact:– Email: [email protected]– Website: http://ww.comp.nus.edu.sg/~stevenha/myteaching– Office: COM1-2-46, Teaching Assistants Office