Date |
Summary |
2020.8.31 |
- 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
- String and dates
- Rational operators (<, ==, >) and logical values
- Logical operators (~, &, |) and quantifiers (all, any)
- Market data of Taiwan Stock Exchange (from TEJ)
|
2020.9.1 |
- 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
- Jump statements (break, continue)
- Nested loops
|
2020.9.2 |
- Flow controls (cont'd)
- Two common algorithms: sorting and random permutation
- Performance analysis
- Plotting
- 2D charts: line, bar, dual y-axis chart, histogram, stackedplot (feat. table), candle plot (feat. timetable), fplot, error bar, pie, word cloud, subplot, quiver, contour, worldmap & geoshow (see tw_map.pdf)
|
2020.9.3 |
- Plotting (cont'd)
- Functions
- User-defined functions
- Call stack and variable scope
- Debugger
- Primary function with helper functions
- Function handle and anonymous function
- Error and error handling (try-catch)
- Special issue: text processing
- Special issue: file operations & other I/O
- Spreadsheets: excel, csv
- File operations
- Mat file
- Example: data pooling
|
2020.9.7 |
|
2020.9.8 |
- Matrix computation
- Vectors and matrices
- Inner product: projection
- Linear transform: basic concepts of linear algebra (vector space, linear independece, span, basis, dimension)
- Solving a system of linear equations: inverse matrix
- Example: 2D Laplace PDE boundary value problem by finite difference method (code: fdm_example.m; see partial differential equation toolbox, which uses finite element method; check out these slides)
- Example: polynomial regression by least square error method (also watch using the normal equations to find least-squares solutions; see curve fitting toolbox)
- Digression: overfitting
- Polynomials in vector form
- Convolution
- Root-finding example: internal rate of return (IRR)
- Polynomial derivatives and integration
- Eigenvalue problem
- Singular value decomposition (SVD)
- Example: image compression by Principal Component Analysis (PCA) (code: svd_example.m)
|
2020.9.9 |
- Optimization
- Statistics
- We will follow the content of Learning Statistics with Programming
- Some data sources
- Basic concepts: probability distribution, random variable, simple random sampling, statistic, estimator, hypothesis
- Descriptive statistics: mean, median, mode, var, std, movmean, movstd
- Cumulative probability function (cdf) & probability density function (pdf): uniform, normal (normcdf, normpdf), chi-square (chi2cdf, chi2pdf)
|
2020.9.10 |
|