Algorithmization and Programming
Code  Completion  Credits  Range  Language 

E012036  KZ  3  1P+2C+0L  English 
 Garant předmětu:
 Petr Sváček
 Lecturer:
 Petr Sváček, David Trdlička
 Tutor:
 Petr Sváček, David Trdlička
 Supervisor:
 Department of Technical Mathematics
 Synopsis:

Programming in MATLAB and its programming language. MATLAB command line. Elementary commands, variable, assignment and expression. Matrices, vectors and operations. Writting Mscript. Input and output. Condition and cycle. Algorithmization of simple problems in MATLAB. Graphical commands. Matrix operations. Systems of linear equations. Scripts and functions. Structure of program. Variables, expressions, assignment, and input / output commands. switch. For cycle. Arrays and files. Pointers. Structures. Algorithmization of simple programs: minimum, mean, norm, numerical integration, bisection method, Newton method, matrix operations. Direct methods for solution of systems of linear equations.
 Requirements:

Programming in MATLAB and its programming language. MATLAB command line. Elementary commands, variable, assignment and expression. Matrices, vectors and operations. Writting Mscript. Input and output. Condition and cycle. Algorithmization of simple problems in MATLAB. Graphical commands. Matrix operations. Systems of linear equations. Scripts and functions. Structure of program. Variables, expressions, assignment, and input / output commands. switch. For cycle. Arrays and files. Pointers. Structures. Algorithmization of simple programs: minimum, mean, norm, numerical integration, bisection method, Newton method, matrix operations. Direct methods for solution of systems of linear equations.
 Syllabus of lectures:

1. Introduction, working with the MATLAB environment. Basic commands, variables, assignment, expression. Matrices and vectors, operations with them. Mscripts.
2.3. MATLAB: Command input and output. Conditional command. Cycle. Algorithmization of simple problem in MATLAB. Graphical commands(plot). Matrix operations. Systems of linear equations. Functions.
4.5. Algorithmization of simple problems: minimum, sum, average, norm, numerical integration, interval bisection method, Newton's method, matrix operations. Direct methods of solving systems of linear equations.
67 Selected algorithms of numerical mathematics  solution of the equation f(x) = 0, interpolation by polynomial and spline functions, approximation by the method of least squares. Fast algorithms  Fourier transformation, fast sorting algorithms. Structure.
 Syllabus of tutorials:

1. Working in MATLAB environment, variable, assignment, expression. Mathematical functions. Command help, disp and input. Vectors and matrices, operations with them. Determinant of matrices, inverse matrices, multiplication of matrices. System of linear equations, backslash operator.
2. System of linear equations, backslash operator. Determinant, inverse matrix. Eigenvalues and eigenvectors of a matrix. Editor and script. Working with data (load, save) and graphical output by plot.
3. Editor, preparation of program (script). Input/output commands. Implementation of a simple program (calculation). Command if. Algorithmization of a simple script with conditional command.
4. Cycles. Vector/matrix element operations and componentwise operators. Implementation of a simple program (sum, minimum).
6. Preparation of user functions in MATLAB. Numerical integration and numerical differentiation. Estimation of the numerical integration error by the halfstep method.
7. Realization of own function in MATLAB. Finding the root of the nonlinear equation f(x) = 0. Bisection of intervals, method of secants. Newton's method.
8. Gaussian elimination. Implementation using a function. Structure of a complex program.
9. Polynomial and spline interpolation. Commands for interpolation and spline functions. Approximation of data, method of least squares. Linear regression.
10. Structures in MATLAB. Implementation of a function with a structure argument. Advanced work with graphics in MATLAB. Plot command, description of graph and displayed quantities. Tangent to the graph of the function. Commands get, set, gca, gcf, etc.
11. Graphic representation of the Taylor polynomial, the partial sum of the Fourier series. Export image to file, print command. Charts in 3D.
12. Fast Fourier transform. Use for signal processing. Sorting. Command find.
13. Reserve
 Study Objective:

Programming in MATLAB and its programming language. MATLAB command line. Elementary commands, variable, assignment and expression. Matrices, vectors and operations. Writting Mscript. Input and output. Condition and cycle. Algorithmization of simple problems in MATLAB. Graphical commands. Matrix operations. Systems of linear equations. Scripts and functions. Structure of program. Variables, expressions, assignment, and input / output commands. switch. For cycle. Arrays and files. Pointers. Structures. Algorithmization of simple programs: minimum, mean, norm, numerical integration, bisection method, Newton method, matrix operations. Direct methods for solution of systems of linear equations.
 Study materials:

[1] MATLAB User's Guide, Reference Guide. The MathWorks, Inc.
[2] Martin Mareš, Tomáš Valla, Průvodce labyrintem algoritmů, Edice CZ.NIC (in czech)
[3] Online kurz v MOODLE https://moodlevyuka.cvut.cz/
[4] Online web page http://marian.fsik.cvut.cz/zapg/
[5] Munther Gdeisat and Francis Lilley, MATLAB® by Example : Programming Basics,
https://ebookcentral.proquest.com/lib/cvut/detail.action?docID=1110717
[6] Richard Colgren, Basic MATLAB, Simulink, and Stateflow
https://ebookcentral.proquest.com/lib/cvut/detail.action?docID=3111497
 Note:
 Timetable for winter semester 2023/2024:

06:00–08:0008:00–10:0010:00–12:0012:00–14:0014:00–16:0016:00–18:0018:00–20:0020:00–22:0022:00–24:00
Mon Tue Wed Thu Fri  Timetable for summer semester 2023/2024:
 Timetable is not available yet
 The course is a part of the following study plans: