# Introduction to Matlab Programming with Applications

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

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

## Goal

This short course is designed for the students who want to learn Matlab programming without any experiences before. The students will be introduced to Matlab features and syntaxes. Besides, the fundamentals of programming concepts are delivered with elegant algorithms. You are expected to be capable to implement programs with Matlab independently after this class. Moreover, I expect that you could feel more confident of learning more programming languages and dealing with advanced topics in the future.

## Prerequisites

• Logic
• High school math

• No textbook.

## Overview

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

#### Essentials

• Variables, data types, and vectorization
• Common data structures: arrays, cells, structures
• Control structures: if-else, switch-case, try-catch, for, while
• Analysis of algorithms
• Functions and recursion
• 2D and 3D plotting
• Input and output
• Matrix computation and numerical linear algebra
• Graphic user interfaces

#### Applications

• Numerical methods (root-finding, curve fitting, numerical integration, ODEs, PDEs)
• Optimizations
• Computational statistics and Monte Carlo simulation
• Digital image processing
• Time series analysis
• Financial engineering
• Machine learning and data mining
• Neural network and deep learning
• Note that selected topics from the items above are introduced as examples in Essentials.

## 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 ]

Date Summary
2017.3.1 program, cpu, memory, memory hierarchy, programming languages (machine code, high-level language), computational solution, algorithms, variables;
2017.3.4 binary system, data types (integers/floating points), numerical errors, scalars, arrays, cells, structures, vectorization, element-by-element operators, rational operators (<, =, >), logical operators (~, &, |, &&, ||);
2017.3.8 selection (if-elseif-else, switch-case-otherwise), error and error handling (try-catch), for loops, while loops;
2017.3.11 jump statements (break, continue), nested loops; exercise: poker.zip;
2017.3.15 analysis of algorithms, profiling, functions; feedback;
2017.3.18 call stack, scope of variable, primary/subfunction, anonymous functions, recursion; midterm (powTest.zip);
2017.3.22 2D plots, PROJECT: European call option prices (BlackScholesModel.m, EuroCall_MonteCarloSimulation.m, option pricer, Black–Scholes formula), graphics objects, get/set methods, 3D plots, interpolations;
2017.3.25 file I/O, exercise: pdf, string and regular expressions;
2017.3.29 gui design, matrix computation, system of linear equations;
2017.4.1 (no class)
2017.4.5 Gauss elimination, 2D Laplace PDE boundary value problem by finite difference, least square error method, polynomials, polynomial fitting, overfitting issue, eigenvalue problems (see The World's Largest Eigenvalue Problem), singular value decomposition (image compression by SVD, svd_image_compression.m, SVD applications), Simulink tutorial, PROJECT: Blurring and edge detection by using FFT (Discrete Fourier Transform, imageProcessing_LowHighPass.m), The SVM classifier, dataset; feedback sheet;