Introduction to MATLAB Programming with Applications

Location: Room 108, 德田館
Time: 1900 ~ 2200


``All science is dominated by the idea of approximation.''
-- Bertrand Russell (1872-1970)

Instructor Information

Wi-Fi Access

Recording Classroom Lectures Policy Recording of classroom lectures is prohibited unless advance written permission is obtained from the class instructor and any guest presenter(s).

Objectives

Prerequisites

Text

Overview

The major topics covered in the short course, if time permitting, are listed below for your reference.

Essentials

Selected toolboxes

You could see the complete list of toolboxes offered by MATLAB. If you want a trial version of MATLAB, please check this page. After you evaluate MATLAB and you think it benefits your work (or you may try another reason: MATLAB vs. Python: Top Reasons to Choose MATLAB), I strongly recommend tha you could purchase MATLAB by visiting the page how to buy. If you cannot activate MATLAB in our classroom, update its license by using network.exe.

TODO list

Schedule [ 236, 237, 238, 242, 244, 245, 247, 249, 251, 252, 253, 254, 256, 258, 260, 261, 262, 263, 264, 265, 266, 268, 272, 273, 275, 277, 279, 280, 281, 282, 283, 288, 289, 294, 295, 296, 297, 303, 304, 306, 307, 311, 317, 318, 322, 323 ]

Date Summary
2019.12.11
  • Syllabus: grading policy, algorithm, working environment
  • Data, data type, and vectorization
    • Variables and data types (integers, floats, strings)
    • Numerical errors: finite precision
    • Assignment operator (=) with a simplified memory model
    • Arithmetic operators (+, −, *, /)
    • Arrays (aka vectors and matrices)
    • Vectorization: element-by-element operations
    • Cells
      • Market data: twse_all.xlsx (1971/01/05 ~ 2019/12/18)
      • A special data type: datetime
2019.12.14
  • Data, data type, and vectorization (cont'd)
    • Rational operators (<, ==, >) and logical values
    • Logical operators (~, &, |) and quantifiers (all, any)
  • Flow controls
    • Selections (&&, ||, if-elseif-else, switch-case-otherwise)
    • Loops (for, while) (also try this game)
    • Numerical examples: Monte Carlo simulation, bisection method for root-finding
2019.12.18
  • Flow controls (cont'd)
    • Jump statements (break, continue)
    • Nested loops
    • Two common algorithms: sorting and random permutation
  • Performance analysis
  • Plotting
2019.12.21
  • Plotting (cont'd)
    • 2D charts: stackedplot (feat. table), candle plot (feat. timetable), fplot, error bar, pie, word cloud, subplot, quiver, contour
    • 3D charts: mesh, surface, 3d line
    • Supplementary materials
2019.12.25
2019.12.28
2020.1.4
2020.1.8
2020.1.11 Taiwan presidential election day: no class.
2020.1.15
2020.1.18

Sample code

Interesting topics for final projects

Gradebook

References

MATLAB

Linear algebra

Numerical analyses and methods

Data mining and machine learning

Optimization

Simulink

Misc

  • TED educational clips

    Additional reading