Aperçu des sections
Introduction:
Teaching unit: Methodological;Subject: Programming tools for mathematics.Field/Sector: 1 LMDSemester: 2, Academic year: 2023/2024Credit: 2, Coefficient: 1Weekly Hourly Volume: 1h.30min-Lecture (1 hour 30 minutes)- Practical work (1 hour 30 minutes)Language of instruction: EnglishTeacher responsible for the subject: Dr. Hafidi Mohamed, Grade: M.C.AOffice: 12 (IT department)Email: mhhafidi@gmail.comGoals : This course is aimed at undergraduate students (1 year). It is part of the modules of the methodological teaching unit. This course serves to introduce the student to the basic concepts of the MATLAB, SCILAB and OCTAVE programming languages to enable them to quickly acquire autonomy in using the software. It allows you to:(1) Acquire the knowledge that will allow you to use Matlab, SCILAB and OCTAVE software effectively and (2) Get a clear idea of the potential contribution of this software to solving problems arising from mathematics . The course is divided into six chapters:Part A: Mastery of Matlab softwareChapter 1: General and getting startedChapter 2: VectorsChapter 3: MatricesChapter 4: Programming in Matlab Chapter5: Graphical representation in MatlabPart B: Mastery of SCILAB softwarePart C: Mastery of OCTAVE softwarePart D: ApplicationsForeword: This course is aimed at first-year computer science students, as well as other first-year students wishing to solve concrete problems using numerical methods that are simple, precise and robust. Their concerns are therefore to achieve their goals, while avoiding the tedious learning of programming languages which do not by default have adequate mathematical tools, which requires inefficient reprogramming. This course is divided into four parts. for more details consult the syllabus.Goals The need for applied mathematics requires the student to master a programming tool for mathematics. At the end of this module, the student must be able to:1. Learn to use MATLAB, SCILAB, OCTAVE and do basic arithmetic;2. Program in MATLAB, SCILAB, OCTAVE environments;3. Working with variables;4. Create a 2D and 3D plot;5. Create vectors, matrices and perform basic and advanced operations;6. Solve equations and a system of equations;Prerequisites Students wishing to follow this training must have prerequisites on:1. Basic computing (installing software and editing text files);2. The basic notions of algorithms: variables, data structures, control structures, loops, etc.;Chapter 1: General and getting started
This chapter presents the programming mode in MATLAB. It includes all the basic concepts that the student needs to know. Topics covered include variables, numbers, main functions, main commands and much more.
TP1
Objective: The objective of this first practical is to become familiar with the MATLAB graphical interface and to learn how to define calculation expressions and how to use certain predefined functions under the MATLAB command line (command window).
Chapter 2: Vectors
MATLAB was originally designed to allow mathematicians, scientists and engineers to easily use the mechanics of linear algebra. we first present the vectors then the matrices which are very intuitive and convenient in MATLAB.TP2
Objective: The objective of this practical work is to learn how to: define, manipulate and operate on vectors in MATLAB.
Chapter 3: Matrices
The basic element for MATLAB is a matrix with complex elements. Thus any real number is considered as a matrix with one row and one column whose only element has a zero imaginary part. A vector is nothing other than a matrix with one row or one column. Vectors are also used to represent polynomials and character strings. Multidimensional arrays are matrices concatenated in certain directions.
TP3
Objective: The objective of this practical work is to learn how to: define, manipulate and operate on matrices (2-dimensional vectors).
Chapter 4: Programming in Matlab
So far we have seen how to use MATLAB to perform commands or to evaluate expressions by writing them in the command line (After the >> prompt), therefore the commands used are generally written as a single instruction (possibly on a single line). However, there are problems whose solution description requires several instructions, which requires the use of several lines. For example, searching for the roots of a quadratic equation (taking into account all possible cases). A collection of well-structured instructions aimed at solving a given problem is called a program. In this part of the course, we will present the mechanisms for writing and executing programs in MATLAB.TP4
Part A. MATLAB scripts: In order to be able to reuse the calculation lines, it is useful to put them in a script. A script is a text file that MATLAB can read and execute. To access it:(1) Open the MATLAB script editor either by clicking on the blank page in the toolbar, or by going to the "File/New/M-file" menu.Part B. MATLAB Functions: There are many predefined functions in MATLAB, but there will inevitably come a time when you want to use a function that is not defined. Fortunately, it is possible to define your own functions and use them exactly like pre-existing functions.Part C. Using functions and scripts together: In case of complex and difficult to solve programs use functions with the MATLAB program.Chapter 5: Graphical representation in Matlab
MATLAB, in addition to allowing very high-level numerical calculations, it can also produce impressive 2D or 3D graphics. To get a brief overview of MATLAB's graphics capabilities, we have access to graphics demos. In this chapter, we will present the basic principles essential for drawing curves in MATLAB.
TP5
The objective of this practical work is to learn how to represent and analyze data graphically using graphic windows. We also learn how to build a graphical user interface using the MATLAB GUIDE.