Algorithmization and Programming (E012035)

Katedra: | ústav technické matematiky (12101) | ||

Zkratka: | Schválen: | 14.03.2011 | |

Platí do: | ?? | Rozsah: | 1P+2C |

Semestr: | * | Kredity: | 4 |

Zakončení: | KZ | Jazyk výuky: | EN |

Anotace

Programming in MATLAB and its programming language. MATLAB command line. Elementary commands, variable, assignment and expression. Matrices, vectors and operations. Writting M-script. 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.

Vyučující

Ing. David Trdlička Ph.D.

Zimní 2023/2024

Ing. David Trdlička Ph.D.

Zimní 2022/2023

RNDr. Marta Čertíková Ph.D.

Zimní 2021/2022

Osnova

1. Introduction, working with the MATLAB environment. Basic commands, variables, assignment, expression. Matrices and vectors, operations with them. M-scripts.

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.

6-7 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.

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.

6-7 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.

Osnova cvičení

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 half-step method.

7. Realization of own function in MATLAB. Finding the root of the non-linear 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

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 half-step method.

7. Realization of own function in MATLAB. Finding the root of the non-linear 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

Literatura

[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://moodle-vyuka.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

[2] Martin Mareš, Tomáš Valla, Průvodce labyrintem algoritmů, Edice CZ.NIC (in czech)

[3] Online kurz v MOODLE https://moodle-vyuka.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

Požadavky

Programming in MATLAB and its programming language. MATLAB command line. Elementary commands, variable, assignment and expression. Matrices, vectors and operations. Writting M-script. 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.