How to set up smartphones and PCs. Informational portal

matlab description. Other application packages

TAMBOV STATE TECHNICAL UNIVERSITY


CHAIR

« Information processes and management"

Methodical development

for laboratory lesson No. 1

in the discipline "Theory of decision making"

Name of the discipline

topic name

Topic: Study of one-dimensional optimization methods

Objective:

Study of methods of one-dimensional optimization and methods of their algorithmic implementation in the environment of the multifunctional integrated automation system for mathematical and scientific and technical calculations MATLAB 7.1;

Comparative evaluation in terms of the amount of computational costs of methods: direct scanning, dichotomy, "golden section" and the Fibonacci method.

Literature:

1. Aoki M. Introduction to optimization methods. M.: Nauka, 1977. 444 p.

2. Batishchev D.I. Methods of optimal design. M.: "Radio and communication", 1984. 248 p.

3. Bodrov V.I., Lazareva T.Ya., Martemyanov Yu.F. Mathematical methods of decision making: Proc. allowance. Tambov: Tambov Publishing House. state those. un-ta, 2004. 124 p.

4. Polak E. Numerical optimization methods. M.: Mir, 1997. 376 p.

5. Himmelblau D. Applied non-linear programming. M.: Mir, 1975. 534 p.

6. Yudin D.B. Computational methods decision theory. M.: Nauka, 1989. 316 p.

7. Ketkov Yu. L., Ketkov A. Yu., Shults M. M. MATLAB 7: programming, numerical methods. - St. Petersburg: BHV-Petersburg, 2005. - 752 p.

For the lesson

Laboratory classes in the discipline "Theory of Decision Making" are held in order to deepen and consolidate the theoretical knowledge gained by students in various types of classes and in the process of independent study educational material, their acquisition of skills in the practical implementation of mathematical methods of decision making. According to the results of laboratory classes, students should

The theoretical material on the basis of which the modeling was carried out, as well as the essence of the physical processes formalized in the programs;

Basic methods for modeling relevant processes;

Perform selection and evaluation of the influence of the main parameters on the simulation result;

Analyze and summarize the results obtained.

The laboratory work includes three stages: preliminary training to the laboratory lesson, the lesson itself, reporting on the laboratory lesson.

The lesson aims to show the connection between theoretical material and practice and teach students to apply theory to solving practical problems.

The labs are structured in such a way that they do not require students to be familiar with MATLAB. Each lab begins with a brief description of MATLAB, where the student is given brief information needed to complete this job.

Preparing for the lesson

Before class, students should:

Familiarize yourself with the manual for this laboratory lesson;

Repeat the lecture material and study the proposed literature on this topic;

Study the order of work;

Prepare to answer Control questions.

The order of the lesson

In the introductory part of the lesson, the study group is received, a connection is made with the previously studied material, the topic, purpose, procedure and features of the lesson are announced, and the preparedness of the study group for the lesson is checked.

Next, students begin to conduct research in accordance with the methodology. For all unclear questions regarding the laboratory session, students should contact the teacher, engineering staff or instructor of the computer class. The results of research and conclusions are drawn up in the form of a report on a laboratory lesson. The report is the student's working document and is presented to the lead teacher during the defense. Next, the reports on the laboratory lesson are protected, and at the end - summing up the results of the lesson.

Class reporting

Students must receive a credit for a laboratory lesson. The principle of reporting is individual and can be carried out orally or in writing after completing the main part of the lesson. When assigning a test mark, the following are taken into account: the availability, literacy and accuracy of the design of the report form, the quality of laboratory work, the results of answers to control questions. Students who have not received a credit and are absent from this laboratory lesson report on it in their personal time.

Brief description of MATLAB

The MATLAB (Matrix Laboratory) system consists of a large number of special programs that allow you to solve wide range mathematical and technical problems from different fields of science. Its main element is the core of the MATLAB system. In addition to it, the system contains about 80 different sets of commands (the so-called "Toolboxes"), corresponding to various sections of mathematics, mathematical physics, design, communications, economics, etc. In this work, the basic MATLAB programming tools are used: M-files - functions, built-in functions, operators, commands, etc.

Fig.1. desktop system

Figure 1 shows the desktop of the system. The menu bar (File, Edit, etc.) is in many ways similar to that of the Microsoft Word editor. The row of icons below also perform the same operations as in the Word editor (with the exception of the last 3). The system desktop consists of several windows, the composition of which can be changed using menu commands desktop. In Fig. 1, in the upper window on the left, the contents of the workspace are shown. Workspace, where descriptions of all constants and functions entered by the user in the process of work are placed. In the lower window command history the sequence of executed commands is given. Window sizes are adjusted by dragging the border with the mouse. Main desktop window command window(command window). In the command window, after the ">>" sign, the command line is typed, which is executed after pressing the " Enter".

MATLAB allows you to create program files similar to other high-level programming languages. Along with that, it has the properties of a powerful programmable calculator. In this paper, the software implementation of search algorithms is carried out using M - function files, and the launch of programs and input of initial data can be done from the command window.

The number format is set by the menu file(Fig.1) in the section Preferences using the function Numeric Format. The most commonly used of the 12 possible formats are short and Long– short and long number formats.

Some of the basic concepts of MATLAB are variables and statements .

Variable denoted by a single letter or a set of letters and numbers beginning with a letter. The total number of letters and numbers in a set must not exceed nineteen. Statement has the following form:

>>variable=expression

When a statement is introduced, the variable is assigned the expression that follows the equals sign, or, if it includes any mathematical operations, the result that is obtained after performing these operations. You can enter the assertion in an M-file or in the command window of the MATLAB program. The ">>" sign is a command prompt that appears on the display screen in a command window to indicate that statements can be entered.

The main arithmetic operators are given in Table 1.1. When performing calculations in the command window after pressing the " Enter" the result is assigned to the parameter " ans", if the corresponding expression has not been given a name, or its name - otherwise (the names of variables, constants and functions must begin with a letter (Latin letters), may contain numbers and an underscore). To block the output of the calculation result of some expression, after it, set sign; (semicolon).

Table 1.1

Let, for example, it is required to evaluate the expression and assign the result to a variable X. In this case, the statement (program) will have the following form (in decimal fractions, the integer part is separated from the fractional part by a dot):

>> x=log(1+5*((log10(100))^2-0.2*pi)/sqrt(1+2.71828^3))

After the introduction of the assertion, i.e. pressing the Enter key, the result is immediately displayed below. If the result needs to be blocked, i.e. do not need to be displayed on the display screen, then at the end of the statement you need to put the sign “ ; » (semicolon). The previous expression can also be expressed in another form:

>> a=(log10(100))^2;

>> b=sqrt(1+2.71828^3);

>> x=log(1+5*(a-0.2*pi)/b)

MATLAB has several built-in variables: pi, eps, inf, i and j. Variable pi denotes a number eps=2 -52 =2.2204*10 -16 – error for floating point operations, inf- Infinity ( ), i and j– imaginary unit ( i = j= ).

When the argument on the left is omitted, the result of the expression is assigned to the shared variable ans.

Relational operators (Table 1.2) are used in conditional statements, loop statements, and so on. when implementing search algorithms using M-functions (subprograms-functions are written in files with the .m extension).

Table 1.2

So, programs in the MATLAB system are M-files of a text format containing the recording of programs in the form of program codes.

The MATLAB input language has a total of 9 statements using 14 service words. The corresponding syntactic constructions are given in Table. 1.3.

Table 1.3

Operator format Explanation
var = exp assignment operator. Calculates the values ​​of the expr expression and stores the results of the calculations in a variable var
if condition_1 statements_1 end Conditional operator. If condition_1 is true, then the statement_1 group is executed, if condition_2 is true, then the statement_2 group is executed, ... If all the specified conditions turn out to be false, then the statements located between else and end are executed
switchexpr casevail statements_1 caseval2 statements_2 . . . . . . . . . [othervise statements] end Switch by value of expression expr. If it matches the value of vail , then the statement_1 group is executed, if it matches the value of val2, then the group of statements_2 is executed, ... If the value of expr does not match any of the listed values, then the statements located between othervise and end are executed
forvar=el:e3 end statements A loop of arithmetic progression type, in which the variable var at each repetition of the loop body changes from the initial value el with step e2 to the final value e3
whilecondition statements end A loop with a precondition that repeats as long as the specified condition is true
try statements_1 catch statements 2 end An attempt was made to execute a group of statements_1. Provided that as a result of their implementation arises exception, control is transferred to the group operators_2 (handling of failure situations). If no error occurs, then group statements_2 is not executed
break Early exit from control structures like for , while, switch, try - catch
function f1 function f2 (x1,x2, . . .) function y=f3(xl,x2,...) function =f4(xl,x2,. . .) Function header (xl, x2, ... - input parameters; y, yl, y2, ... - output parameters)
return Early exit from function body

When writing function programs, it is required that the name of the M-file in which the program is stored must necessarily coincide with the name of the function.

All variables appearing in the body of a function, with the exception of global variables (declared by the global statement), input and output parameters, are considered local. They form a local working space and are available only in the body of the function that generated them, and no other functions can use them.

The MATLAB language does not contain an operator goto. In this regard, there are no operator labels in the texts of m-files. To identify the lines in which emergencies, extension numbers automatically assigned by the system are used.

    Main features of the packagematlab

    Package tool kitsmatlab

    Structure and working windows of the packagematlab

    Working in command mode

    Basic elements of a programming languagematlab

1. Main features of the Matlab package

MATLAB(short for the English "Matrix Laboratory") - a package of applied programs for solving problems of technical calculations and the programming language of the same name used in this package. MATLAB is used by more than 1,000,000 engineers and scientists and runs on most modern operating systems, including Linux, Mac OS, Solaris (Solaris has been deprecated since R2010b) and Microsoft Windows.

Story. MATLAB as a programming language was developed by Cleve Moler in the late 1970s when he was the dean of the faculty computer science at the University of New Mexico. The purpose of the development was to give students of the faculty the opportunity to use the Linpack and EISPACK software libraries without the need to learn Fortran. The new language soon spread to other universities and was received with great interest by scientists working in the field of applied mathematics. You can still find a 1982 version written in Fortran on the Internet, distributed with open source. Engineer John N. (Jack) Little was introduced to the language during a 1983 visit by Clive Moler to Stanford University. Realizing that the new language had great commercial potential, he teamed up with Clive Moler and Steve Bangert. Together they rewrote MATLAB in C and founded The MathWorks in 1984 to further development. These rewritten C libraries were known for a long time under the name JACKPAC. MATLAB was originally intended for control systems design (John Little's main specialty), but quickly gained popularity in many other scientific and engineering fields. It has also been widely used in education, in particular for teaching linear algebra and numerical methods.

Description of the MATLAB language. MATLAB language is high level interpreted programming language, including those based on matrices data structures, a wide range of functions, an integrated development environment, object-oriented features and interfaces to programs written in other programming languages.

Programs written in MATLAB are of two types - functions and scripts.

Functions have input and output arguments, as well as their own workspace for storing intermediate results of calculations and variables.

Scripts share a common workspace. Both scripts and functions are not compiled to native code and are saved as text files.

It is also possible to save so-called pre-parsed programs - functions and scripts processed into a form convenient for machine execution. In general, such programs run faster than usual ones, especially if the function contains plotting commands.

The main feature of the MATLAB language is its wide possibilities for working with matrices, which the creators of the language expressed in the slogan “think vectorially” (Eng. Think vectorized).

Application of MATLAB.

Mathematics and Computing. MATLAB provides the user with a large number (several hundred) of functions for data analysis, covering almost all areas of mathematics, in particular:

    Matrices and linear algebra - matrix algebra, linear equations, eigenvalues ​​and vectors, singularities, matrix factorization and others.

    Polynomials and interpolation - roots of polynomials, operations on polynomials and their differentiation, interpolation and extrapolation of curves, and others.

    Mathematical statistics and data analysis - statistical functions, statistical regression, digital filtering, fast Fourier transform and others.

    Data processing - set special functions, including plotting, optimization, searching for zeros, numerical integration (in quadratures), and others.

    Differential equations - solution of differential and differential-algebraic equations, differential equations with delay, equations with restrictions, partial differential equations and others.

    Sparse matrices are a special MATLAB data class used in specialized applications.

    Integer arithmetic - performing integer arithmetic operations in the MATLAB environment.

Development of algorithms. MATLAB provides convenient tools for developing algorithms, including high-level ones using object-oriented programming concepts. It has all the necessary IDE tools, including a debugger and a profiler. Functions for working with integer data types make it easy to create algorithms for microcontrollers and other applications where necessary.

Data visualization. The MATLAB package has a large number of functions for plotting, including three-dimensional, visual data analysis and creating animated videos.

The built-in development environment allows you to create graphical user interfaces with various controls, such as buttons, input fields, and others.

Independent Applications. MATLAB programs, both console and GUI, can be built using the component MATLAB Compiler into MATLAB-independent executable applications or dynamic libraries, which, however, require the installation of a freely redistributable environment to run on other computers MATLAB Compiler Runtime(MCR).

external interfaces. The MATLAB package includes various interfaces for accessing external routines written in other programming languages, data, clients and servers that communicate through Component Object Model or Dynamic Data Exchange technologies, and peripherals that communicate directly with MATLAB. Many of these features are known as the MATLAB API.

com. The MATLAB package provides access to functions that allow you to create, manipulate, and delete COM objects (both clients and servers). ActiveX technology is also supported. All COM objects belong to a special MATLAB COM class. All programs that have the functions of an automation controller (eng. Automation controller) can access MATLAB as an automation server (eng. Automation server).

.NET The MATLAB package on Microsoft Windows provides access to the .NET Framework programming platform. It is possible to load .NET assemblies (Assemblies) and work with objects of .NET classes from the MATLAB environment. MATLAB 7.11 (R2010b) supports .NET Framework versions 2.0, 3.0, 3.5, and 4.0.

DDE. The MATLAB package contains functions that allow it to access other applications in the Windows environment, as well as these applications to access MATLAB data, using Dynamic Data Exchange (DDE) technology. Each application that can be a DDE server has its own unique identification name. For MATLAB, this name is - matlab.

Web services. In MATLAB, it is possible to call web service methods. A special function creates a class based on the web service API methods.

MATLAB interacts with a web service client by accepting packages from it, processing them, and sending a response. The following technologies are supported: Simple Object Access Protocol (SOAP) and Web Services Description Language (WSDL).

COM port. The MATLAB serial port interface provides direct access to peripherals such as modems, printers, and scientific equipment that connect to the computer through a serial (COM) port. The interface works by creating an object of a special class for the serial port. The available methods of this class allow you to read and write data to the serial port, use events and event handlers, and write information to the computer disk in real time. This may be necessary when conducting experiments, simulating real-time systems, and for other applications.

MEX files. The MATLAB package includes an interface for interacting with external applications written in C and Fortran. This interaction is carried out through MEX-files. It is possible to call subroutines written in C or Fortran from MATLAB as if they were built-in functions of the package. MEX files are dynamically linked libraries that can be loaded and executed by the interpreter built into MATLAB. MEX procedures also have the ability to call built-in MATLAB commands.

DLL. The MATLAB shared DLL interface allows you to call functions found in regular dynamic link libraries directly from MATLAB. These functions must have a C interface.

In addition, MATLAB has the ability to access its built-in functions through the C interface, which allows you to use the functions of the package in external applications written in C. This technology in MATLAB is called C Engine.

Alternative packages. Exists a large number of software packages for solving problems of numerical analysis. Many of these packages are free software.

Compatible with MATLAB at the programming language level:

close in functionality:

    APL and its descendants: e.g. J

    Python, when used with the Python(x,y) package, and with libraries such as NumPy, SciPy, and matplotlib, provides similar functionality.

    IDL interactive Data language, interactive language data descriptions), once a commercial competitor to MATLAB, is now a serious competitor in many application areas, although its market share in numerical analysis software products has plummeted.

    Fortress, a programming language created by Sun Microsystems, is a successor to Fortran, but is not compatible with it.

    If necessary, develop big projects for numerical analysis, it is possible to use general-purpose programming languages ​​that support static typing and modular structure. Examples are Modula-3, Haskell, Ada, Java. In this case, it is recommended to use specialized libraries known in the scientific and engineering environment.

2. Toolboxes of the Matlab package

In Matlab, an important role is given to specialized groups of programs called toolboxes. Toolboxes are a comprehensive collection of functions (m-files) written in the MATLAB language to solve a specific class of problems. Mathworks provides toolkits that are used in many areas, including the following:

    Digital signal, image and data processing: DSP Toolbox, Image Processing Toolbox, Wavelet Toolbox, Communication Toolbox, Filter Design Toolbox- sets of functions that allow solving a wide range of tasks signal processing, imaging, designing digital filters and communication systems.

    Control systems: Control Systems Toolbox, µ-Analysis and Synthesis Toolbox, Robust Control Toolbox, System Identification Toolbox, LMI Control Toolbox, Model Predictive Control Toolbox, Model-Based Calibration Toolbox- sets of functions that facilitate the analysis and synthesis of dynamic systems, design, modeling and identification of control systems, including modern control algorithms such as robust control, H∞-control, LMI-synthesis, µ-synthesis and others.

    The financial analysis: GARCH Toolbox, Fixed Income Toolbox, Financial Time Series Toolbox, Financial Derivatives Toolbox, Financial Toolbox, Datafeed Toolbox- sets of functions that allow you to quickly and efficiently collect, process and transmit various financial information.

    Analysis and synthesis of geographical maps, including three-dimensional: Mapping Toolbox.

    Collection and analysis of experimental data: Data Acquisition Toolbox, Image Acquisition Toolbox, Instrument Control Toolbox, Link for Code Composer Studio- sets of functions that allow you to save and process data obtained during experiments, including in real time. A wide range of scientific and engineering measurement equipment is supported.

    Visualization and presentation of data: Virtual Reality Toolbox- allows you to create interactive worlds and visualize scientific information using virtual reality technologies and the VRML language.

    Development Tools: MATLAB Builder for COM, MATLAB Builder for Excel, MATLAB Builder for NET, MATLAB Compiler, Filter Design HDL Coder- sets of functions that allow you to create independent applications from the MATLAB environment.

    Interaction with external software products: MATLAB Report Generator, Excel Link, Database Toolbox, MATLAB Web Server, Link for ModelSim- sets of functions that allow you to save data so that other programs can work with them.

    Database: Database Toolbox- tools for working with databases.

    Science and math packages: Bioinformatics Toolbox, Curve Fitting Toolbox, Fixed Point Toolbox, Fuzzy Logic Toolbox, Genetic Algorithm and Direct Search Toolbox, OPC Toolbox, Optimization Toolbox, Partial Differential Equation Toolbox, Spline Toolbox, Statistic Toolbox, RF Toolbox- sets of specialized mathematical functions that allow solving a wide range of scientific and engineering problems, including the development of genetic algorithms, solving problems in partial derivatives, integer problems, system optimization, and others.

    Neural networks: Neural Network Toolbox- tools for the synthesis and analysis of neural networks.

    fuzzy logic: Fuzzy Logic Toolbox- tools for constructing and analyzing fuzzy sets.

    Symbolic calculations: Symbolic Math Toolbox- tools for symbolic calculations with the ability to interact with the symbolic processor of the Maple program.

In addition to the above, there are thousands of other MATLAB toolkits written by other companies and enthusiasts.

Now the capabilities of the system significantly exceed the capabilities of the original version of the Matrix Laboratory. The current MATLAB, the brainchild of The MathWorks, Inc., is a highly efficient language for engineering and scientific computing. It supports mathematical calculations, scientific graphics visualization and programming using an easy-to-learn operating environment. The most famous areas of application of the MATLAB system:

Mathematics and Computing;

Development of algorithms;

Computational experiment, simulation modeling, prototyping;

Data analysis, research and visualization of results;

Scientific and engineering graphics;

Application development, including graphical user interface.

MATLAB is an interactive system whose main object is an array, for which you do not need to specify the dimension explicitly. This allows solving many computational problems associated with vector-matrix formulations.

Version MATLAB 6.1 is the penultimate achievement of developers (the last one is MATLAB 6.5).

MATLAB is both an operating environment and a programming language. One of the most strengths system is that programs can be written in the MATLAB language for reuse. The user can write specialized functions and programs himself, which are issued in the form of M-files. That is why the application packages - MATLAB Application Toolboxes, which are part of the MATLAB family of products, allow you to be at the level of the most modern world achievements.

Operating environment of the MATLAB system 6.1. The operating environment of the MATLAB 6.1 system is a set of interfaces that support the communication of this system with the outside world through a dialogue with the user through the command line, M-file editor, interaction with external systems Microsoft Word, Excel, etc.

After starting the MATLAB program, its main window appears on the computer display, containing menu, toolbar with buttons and the client side of the window with an invitation sign. This window is called command window MATLAB systems (Fig. 1).

Menu File(Fig. 2) combines the usual functions: Edit responsible for changing the content Window commands (undo, redo, cut, copy, paste, select all, delete, etc.) and for clearing some MATLAB windows; menu View- for the design of the desktop; Web menu - launches Web pages from the Internet; menu Window– works with M-file editor/debugger (closes all M-files, makes one of them current); menu Help– Works with help documentation and demos.


The option deserves special consideration. Preferences... (choice of characteristics), which, when selected, opens a window that includes a tree of objects on the left (Fig. 3), and on the right, their possible characteristics.

Dashboard command window of the MATLAB system allows you to provide easy access to operations on M-files: creating a new M-file; opening an existing M-file; deleting a fragment; fragment copying; fragment insertion; restoration of only the performed operation, etc.

V client side of the MATLAB command window, after the prompt sign, you can type various numbers, variable names, and operation signs, which together make up some expressions. Pressing the Enter key causes MATLAB to evaluate the expression or, if it is not evaluated, repeat it. Although the sign ";" at the end of the line, suppresses the output of the result (echo output).

Thus, in the client part of the MATLAB command window, the user can immediately write commands that form individual calculations or an entire program.

So, the structural parts of the MATLAB command window were analyzed. But besides them, there are several more MATLAB elements that help when working:

Teams- a window containing in order the previously entered commands in the Command Window ("command history").

Workspace is the area of ​​MATLAB memory that contains system variables. The contents of this area can be viewed from the command line using the commands who(prints only variable names) and whos(displays information about the size of arrays and the type of a variable) or in a separate window with the same name. You can perform the following operations in it: load a data file, save the Workspace as (commands allow you to open and save the contents of the workspace in a binary MAT-file), delete selected variables; open selected variables (where you can change their value). In addition, in the Edit menu, you can clear both the Command Window and the Command History, as well as the Workspace (or execute the command in the Command Window: clear).

You can use the load and save commands to save and run the Workspace.

Example.

Saving to: matlab.mat

>> save my.mat

>> load my.mat

>> save my2

>> load my2

Current directory- a window that is a kind of "explorer" through the MATLAB catalogs.

Launch Editor– a window that displays a tree of MATLAB structural elements and other software tools installed with it, which can be launched by double-left clicking the mouse. For example, this window might look like Figure 9.

M-file editor/debugger- one of the most important structural parts of MATLAB, which can be opened by selecting the appropriate option in the main menu, on the toolbar, or called from the command line with the edit or edit command<имя М-файла>and allows you to create and edit M-files.

The editor/debugger supports the following operations: creation of a new M-file; opening an existing M-file; saving the M-file on disk; deleting a fragment; fragment copying; fragment insertion; help; install/remove checkpoint; continue execution, etc.

GUIDE is a graphical user interface in which the creation of complete applications takes place.

Interactive session. M-files. Interactive mode is a user mode for entering commands and expressions from the keyboard, as a result of which the necessary numerical results are obtained, which can be easily and quickly visualized by the built-in graphical tools of the MATLAB package. However, you cannot use this mode to create and save a specific program. Therefore, the creators of MATLAB, in addition to the Command Window, which implements interactive mode, allocated special files, containing MATLAB language codes, and called M-files (*.m). To create an M-file, a text editor (M-file editor/debugger) is used.

Working in the M-file editor. Working from the MatLab command line is difficult if you need to enter a lot of commands and change them often. The most convenient way to execute commands is to use M-files in which you can type commands, execute them all at once or in parts, save them in a file and use them later. To work with M-files intended editor M-files. Using the editor, you can create your own functions and call them, including from the command line.

Expand the File menu of the main MatLab window and select the M-file subitem in the New item. The new file opens in the editor window M-files (Fig. 10). Let's write to a file a program for calculating the arithmetic mean

variable a and b, then save as fun1.m. Compare the ways to solve the problem presented in the table.

1. Lesson 23: Introduction to MATLAB extension packages

Lesson number 23.

Introduction to MATLAB extension packages

    Listing extension packages

    Simulinc for Windows

    Symbolic Mathematics Package

    Packages mathematical calculations

    Packages for analysis and synthesis of control systems

    System identification packages

    Additional features of the Simulinc package

    Signal and Image Processing Packages

    Other application packages

In this lesson, we will briefly get acquainted with the main means of professional expansion of the system and its adaptation to the solution of certain classes of mathematical and scientific and technical problems - with the extension packages of the MATLAB system. Undoubtedly, at least part of these packages should be devoted to a separate training course or guide, perhaps more than one. For most of these extensions, separate books have been published abroad, and the volume of documentation for them amounts to hundreds of megabytes. Unfortunately, the scope of this book allows only a brief walk through the expansion packs to give the reader an idea of ​​where the system is heading.

2. Listing extension packages

Listing extension packages

The complete composition of the MATLAB 6.0 system contains a number of components, the name, version number and creation date of which can be displayed with the ver command:

MATLAB Version 6.0.0.88 (R12) on PCWIN MATLAB License Number: 0

MATLAB Toolbox

Version 6.0

06-0ct-2000

Version 4.0

Version 4.0

04-0ct-2000

Stateflow Coder

Version 4.0

04-0ct-2000

Real-Time Workshop

Version 4.0

COMA Reference Blockset

Version 1.0.2

Communication Blockset

Version 2.0

Communication Toolbox

Version 2.0

Control System Toolbox

Version 5.0

DSP Blockset

Version 4.0

Data Acquisition Toolbox

Version 2.0

05-0ct-2000

Database Toolbox

Version 2.1

Datafeed Toolbox

Version 1.2

Dials & Gauges Blockset

Version 1.1

Filter Design Toolbox

Version 2.0

Financial Derivatives Toolbox

Version 1.0

Financial Time Series Toolbox

Version 1.0

Financial Toolbox

Version 2.1.2

Fixed Point Blockset

Version 3.0

Fuzzy Logic Toolbox

Version 2.1

GARCH Toolbox

Version 1.0

Image Processing Toolbox

Version 2.2.2

Instrument Control Toolbox

Version 1.0

LMI Control Toolbox

Version 1.0.6

MATLAB Compiler

Version 2.1

MATLAB Report Generator

Version 1.1

Mapping Toolbox

Version 1.2


Version 1.0.5

Motorola DSP Developer's Kit

Version 1.1

Ol-Sep-2000

Mi-Analysis and Synthesis Toolbox

Version 3.0.5

Neural Network Toolbox

Version 4.0

Nonlinear Control Design Blockset

Version 1.1.4

Optimization Toolbox

Version 2.1

Partial Differential Equation Toolbox

Version 1.0.3

Power System Blockset

Version 2.1

Real-Time Workshop Ada Coder

Version 4.0

Real-Time Workshop Embedded Coder

Version 1.0

Requirements Management Interface

Version 1.0.1

Robust Control Toolbox

Version 2.0.7

SB2SL (converts SystemBuild to Simu

Version 2.1

Signal Processing Toolbox

Version 5.0

Simulink Accelerator

Version 1.0

Model Differentiation for Simulink and...

Version 1.0

Simulink Model Coverage Tool

Version 1.0

Simulink Report Generator

Version 1.1

Spline Toolbox

Version 3.0

Statistics Toolbox

Version 3.0

Symbolic Math Toolbox

Version 2.1.2


Version 5.0

Wavelet Toolbox

Version 2.0

Version 1.1

xPC Target Embedded Option

Version 1.1

Please note that almost all extension packages in MATLAB 6.0 are up to date and date back to 2000. Their description has been noticeably expanded, which in PDF format already occupies many more than tens of thousands of pages. Below is a brief description of the main expansion packs.

3 Simulink for Windows

Simulink for Windows

The Simulink extension package is used for simulation modeling of models consisting of graphic blocks with specified properties (parameters). Model components, in turn, are graphic blocks and models that are contained in a number of libraries and can be transferred to the main window with the mouse and connected to each other by the necessary links. Models can include signal sources of various types, virtual recording devices, graphic aids animations. double click mouse on the model block displays a window with a list of its parameters that the user can change. Running a simulation provides mathematical modeling of the constructed model with a visual visual representation results. The package is based on building block diagrams by transferring blocks from the component library to the editing window user-created models. The model is then run for execution. On fig. 23.1 shows the process of modeling a simple system - a hydraulic cylinder. Control is carried out using virtual oscilloscopes - in fig. 23.1 shows the screens of two such oscilloscopes and the window of a simple model subsystem. It is possible to model complex systems consisting of many subsystems.

Simulink composes and solves the equations of state of the model and allows you to connect a variety of virtual measuring instruments to the desired points in it. The clarity of presentation of simulation results is striking. A number of examples of using the Simulink package have already been given in Lesson 4. The previous version of the package is described in sufficient detail in books. The main innovation is the processing of matrix signals. Added individual packages Simulink performance enhancements such as Simulink Accelerator for compiling model code, Simulink profiler for code analysis, etc.

Rice. 23.1. Example of Hydraulic Cylinder System Simulation Using Simulink Extension

1.gif

Image:

1b.gif

Image:

4. Real Time Windows Target and Workshop

Real Time Windows Target and Workshop

The powerful real-time simulation subsystem connected to Simulink (with additional hardware in the form of computer expansion boards), represented by the Real Time Windows Target and Workshop expansion packs, is a powerful tool for managing real objects and systems. In addition, these extensions allow you to create executable model codes. Rice. 4.21 in Lesson 4 shows an example of such a simulation for a system described by non-linear van der Pol differential equations. The advantage of such modeling is its mathematical and physical clarity. In Simulink model components, you can specify not only fixed parameters, but also mathematical relationships that describe the behavior of the models.

5. Report Generator for MATLAB and Simulink

Report Generator for MATLAB and Simulink

Report Generators - a tool introduced in MATLAB 5.3.1, provides information about the operation of the MATLAB system and the Simulink extension package. This tool is very useful when debugging complex computational algorithms or when modeling complex systems. Report generators are launched with the Report command. Reports can be presented as programs and edited.

Report generators can run commands and program fragments included in reports and allow you to control the behavior of complex calculations.

6. Neural Networks Toolbox

Neural Networks Toolbox

A package of applied programs containing tools for building neural networks based on the behavior of a mathematical analogue of a neuron. The package provides powerful support for the design, training, and simulation of many well-known network paradigms, from basic perceptron models to state-of-the-art associative and self-organizing networks. The package can be used to explore and apply neural networks to problems such as signal processing, nonlinear control, and financial modeling. The ability to generate portable C-code using Real Time Workshop is provided.

The package includes more than 15 known types of networks and learning rules, allowing the user to choose the most suitable paradigm for a particular application or research problem. For each type of architecture and training rules, there are functions for initialization, training, adaptation, creation and simulation, demonstration, and an example network application.

For controlled networks, you can choose direct or recurrent architecture using a variety of learning rules and design methods such as perceptron, backpropagation, Levenberg backpropagation, radial basis networks, and recurrent networks. You can easily change any architecture, learning rules or transition functions, add new ones - and all this without writing a single line in C or FORTRAN. An example of using the package for letter image recognition was given in Lesson 4. A detailed description of the previous version of the package can be found in the book.

7. Fuzzy Logic Toolbox

Fuzzy Logic Toolbox

The Fuzzy Logic application package refers to the theory of fuzzy (fuzzy) sets. Support is provided for modern methods of fuzzy clustering and adaptive fuzzy neural networks. The graphical tools of the package allow you to interactively monitor the behavior of the system.

Key features of the package:

  • definition of variables, fuzzy rules and membership functions;
  • interactive viewing of fuzzy inference;
  • modern methods: adaptive fuzzy inference using neural networks, fuzzy clustering;
  • interactive dynamic simulation in Simulink;
  • portable C code generation with Real-Time Workshop.

This example clearly shows the differences in the behavior of the model with and without fuzzy logic.

8. Symbolic Math Toolbox

Symbolic Math Toolbox

A package of application programs that give the MATLAB system fundamentally new opportunities - the ability to solve problems in a symbolic (analytical) form, including the implementation of exact arithmetic of arbitrary bit depth. The package is based on the application of the core of symbolic mathematics, one of the most powerful systems Computer Algebra - Maple V R4. Provides symbolic differentiation and integration, calculation of sums and products, expansion in Taylor and Maclaurin series, operations with power polynomials (polynomials), calculation of polynomial roots, analytical solution of nonlinear equations, various symbolic transformations, substitutions and much more. Has direct access commands to the Maple V kernel.

The package allows you to prepare procedures with the syntax of the programming language of the Maple V R4 system and install them in the MATLAB system. Unfortunately, in terms of the capabilities of symbolic mathematics, the package is far inferior to specialized computer algebra systems, such as the latest versions of Maple and Mathematica.

9. Packages of mathematical calculations

Math Packages

MATLAB includes many extension packages that enhance the mathematical capabilities of the system, increase the speed, efficiency, and accuracy of calculations.

10.NAG Foundation Toolbox

NAG Foundation Toolbox

One of the most powerful math function libraries created by The Numerical Algorithms Group, Ltd. The package contains hundreds of new features. The names of the functions and the syntax for calling them are borrowed from the well-known NAG Foundation Library. As a result, advanced NAG FORTRAN users can easily work with the NAG package in MATLAB. The NAG Foundation library provides its functions in the form of object codes and corresponding m-files to call them. The user can easily modify these MEX files at the source code level.

The package provides the following features:

    polynomial roots and modified Laguerre method;

    calculation of the sum of a series: discrete and Hermitian-discrete Fourier transform;

    ordinary differential equations: Adams and Runge-Kutta methods;

    partial differential equations;

    interpolation;

    calculation of eigenvalues ​​and vectors, singular numbers, support for complex and real matrices;

    approximation of curves and surfaces: polynomials, cubic splines, Chebyshev polynomials;

    minimization and maximization of functions: linear and quadratic programming, extrema of functions of several variables;

    decomposition of matrices;

    solution of systems of linear equations;

    linear equations (LAPACK);

    statistical calculations, including descriptive statistics and probability distributions;

    correlation and regression analysis: linear, multidimensional and generalized linear models;

    multidimensional methods: principal components, orthogonal rotations;

    random number generation: normal distribution, Poisson, Weibull and Koschie distributions;

    nonparametric statistics: Friedman, Kruskal-Wallis, Mann-Whitney; О time series: one-dimensional and multivariate;

    approximations of special functions: integral exponent, gamma function, Bessel and Hankel functions.

Finally, this package allows the user to create FORTRAN programs that link dynamically with MATLAB.

11. Spline Toolbox

A package of applied programs for working with splines. Supports 1D, 2D, and multidimensional spline interpolation and approximation. Provides presentation and display of complex data and graphics support.

The package allows you to perform interpolation, approximation and transformation of splines from B-form to piecewise polynomial, interpolation by cubic splines and smoothing, performing operations on splines: calculating the derivative, integral and mapping.

The Spline package is equipped with B-spline programs described in "A Practical Guide to Splines" by Carl Deboer, creator of splines and author of the Spline package. The package's features, combined with the MATLAB language and detailed user guide, make it easy to understand splines and apply them effectively to a variety of problems.

The package includes programs for working with the two most common forms of spline representation: B-form and piecewise polynomial form. The B-form is convenient at the stage of building splines, while the piecewise polynomial form is more efficient during constant work with the spline. The package includes functions for creating, displaying, interpolating, fitting and processing splines in B-form and as polynomial segments.

12. Statistics Toolbox

Statistics Toolbox

A package of applied programs on statistics that dramatically expands the capabilities of the MATLAB system in the field of implementing statistical calculations and statistical data processing. It contains a very representative set of tools for generating random numbers, vectors, matrices and arrays with different distribution laws, as well as many statistical functions. It should be noted that the most common statistical functions are included in the core of the MATLAB system (including functions for generating random data with uniform and normal distribution). Key features of the package:

    descriptive statistics;

    probability distributions;

    parameter estimation and approximation;

    hypothesis testing;

    multiple regression;

    interactive stepwise regression;

    Monte Carlo simulation;

    approximation on intervals;

    statistical process control;

    experiment planning;

    response surface modeling;

    approximation of a nonlinear model;

    principal component analysis;

    statistical charts;

    graphical user interface.

The package includes 20 different probability distributions, including t (Student's), F, and Chi-square. Fitting, graphical display of distributions, and a way to calculate best fit are provided for all types of distributions. There are many interactive tools for dynamic visualization and data analysis. There are specialized interfaces for modeling the response surface, visualization of distributions, generation of random numbers and level lines.

13. Optimization Toolbox

Optimization Toolbox

A package of applied problems - for solving optimization problems and systems of nonlinear equations. Supports the main methods for optimizing the functions of a number of variables:

    unconditional optimization of nonlinear functions;

    least squares method and non-linear interpolation;

    solution of non-linear equations;

    linear programming;

    quadratic programming;

    conditional minimization of nonlinear functions;

    minimax method;

    multicriteria optimization.

A variety of examples demonstrate the effective use of package functions. With their help, you can also compare how the same problem is solved by different methods.

14. Partial Differential Equations Toolbox

Partial Differential Equations Toolbox

A very important software package containing many functions for solving systems of partial differential equations. Gives effective means for solving such systems of equations, including rigid ones. The package uses the finite element method. The package's commands and graphical interface can be used for mathematical modeling of partial differential equations for a wide range of engineering and scientific applications, including problems of strength of materials, calculations of electromagnetic devices, problems of heat and mass transfer and diffusion. Key features of the package:

    a full-fledged graphical interface for processing partial differential equations of the second order;

    automatic and adaptive grid selection;

    setting boundary conditions: Dirichlet, Neumann and mixed;

    flexible problem statement using MATLAB syntax;

    fully automatic meshing and finite element size selection;

    nonlinear and adaptive design schemes;

    possibility of visualization of fields of various parameters and solution functions, demonstration of the adopted partition and animation effects.

The package intuitively follows the six steps of solving a PDE using the Finite Element Method. These steps and the corresponding modes of the package are: define geometry (draw mode), specify boundary conditions (boundary conditions mode), select coefficients defining the problem (PDE mode), finite element discretization (mesh mode), specify initial conditions, and solve equations (solution mode), post-processing of the solution (graph mode).

15. Packages for analysis and synthesis of control systems

Packages for analysis and synthesis of control systems

Control System Toolbox

The Control System package is intended for modeling, analysis and design of automatic control systems - both continuous and discrete. The package functions implement traditional transfer function methods and modern state-space methods. Frequency and time responses, zero and pole patterns can be quickly calculated and displayed on the screen. The package includes:

    a complete set of tools for the analysis of MIMO-systems (multiple inputs - multiple outputs) systems;

    temporal characteristics: transfer and transition functions, response to arbitrary action;

    frequency characteristics: diagrams of Bode, Nichols, Nyquist, etc.;

    feedback development;

    design of LQR/LQE controllers;

    characteristics of models: controllability, observability, lowering the order of models;

    support for latency systems.

Additional model building functions allow you to design more complex models. The time response can be calculated for a pulse input, a single step, or an arbitrary input signal. There are also functions for analyzing singular values.

An interactive environment for comparing the time and frequency response of systems provides the user with graphical controls for simultaneously displaying responses and switching between them. Various response characteristics can be calculated, such as ramp-up time and ramp-down time.

The Control System package contains tools for selecting feedback parameters. Among the traditional methods: the analysis of singular points, the determination of the gain and attenuation. Among modern methods: linear-quadratic regulation, etc. The Control System package includes a large number of algorithms for designing and analyzing control systems. In addition, it has a customizable environment and allows you to create your own m-files.

16. Nonlinear Control Design Toolbox

Nonlinear Control Design Toolbox

Nonlinear Control Design (NCD) Blockset implements a dynamic optimization method for designing control systems. This tool, designed for use with Simulink, automatically tunes system parameters based on user-defined timing constraints.

The package uses mouse drag and drop to change timing constraints directly on plots, allowing easy setting of variables and specifying uncertain parameters, provides interactive optimization, implements Monte Carlo simulation, supports SISO (one input, one output) and MIMO control system design , allows simulation of interference cancellation, tracking, and other types of responses, supports repeating parameter problems and control problems for latency systems, allows selection between satisfied and unattainable constraints.

17 Robust Control Toolbox

Robust Control Toolbox

The Robust Control package includes tools for designing and analyzing multi-parameter stable control systems. These are systems with simulation errors, whose dynamics are not fully known or whose parameters may change during simulation. Powerful algorithms of the package allow you to perform complex calculations, taking into account changes in many parameters. Package features:

    synthesis of LQG controllers based on the minimization of the uniform and integral norms;

    multi-parameter frequency response;

    building a state space model;

    transformation of models based on singular numbers;

    lowering the order of the model;

    spectral factorization.

The Robust Control package builds on the features of the Control System package while providing an advanced set of algorithms for designing control systems. The package provides a transition between modern control theory and practical applications. It has many features that implement modern methods for designing and analyzing multi-parameter robust controllers.

Manifestations of uncertainties that violate the stability of systems are diverse - noise and disturbances in signals, inaccuracy of the transfer function model, non-simulated nonlinear dynamics. The Robust Control package allows you to evaluate the multi-parameter stability boundary under various uncertainties. Among the methods used: the Perron algorithm, analysis of the features of transfer functions, etc.

The Robust Control package provides various feedback design methods, including: LQR, LQG, LQG/LTR, and others. large systems. A qualitative procedure for lowering the order of a model must be numerically stable. The procedures included in the Robust Control package successfully cope with this task.

18. Model Predictive Control Toolbox

Model Predictive Control Toolbox

The Model Predictive Control package contains a complete set of tools for implementing a predictive control strategy. This strategy was developed to solve practical problems of managing complex multi-channel processes in the presence of restrictions on state variables and control. Predictive control methods are used in the chemical industry and to control other continuous processes. The package provides:

    modeling, identification and diagnostics of systems;

    support for MISO (many inputs - one output), MIMO, transient responses, state-space models;

    system analysis;

    converting models into various forms of representation (state space, transfer functions);

    providing tutorials and demos.

The predictive approach to control problems uses an explicit linear dynamic model of an object to predict the impact of future changes in control variables on the behavior of an object. The optimization problem is formulated as a quadratic programming problem with constraints, which is solved anew at each simulation step. The package allows you to create and test controllers for both simple and complex objects.

The package contains more than fifty specialized functions for the design, analysis and simulation of dynamic systems using predictive control. It supports the following types of systems: pulsed, continuous and discrete in time, state space. Various types of perturbations are processed. In addition, restrictions on input and output variables can be explicitly included in the model.

Simulation tools allow for tracking and stabilization. Analysis tools include the calculation of closed loop poles, frequency response, and other characteristics of the control system. To identify the model in the package, there are functions for interacting with the System Identification package. The package also includes two Simulink functions that allow you to test non-linear models.

19. mu - Analysis and Synthesis

(Mu)-Analysis and Synthesis

The p-Analysis and Synthesis package contains functions for designing robust control systems. The package uses uniform-norm optimization and singular parameter and. This package includes a graphical interface to simplify block operations when designing optimal controllers. Package properties:

  • designing regulators that are optimal in the uniform and integral norm;
  • estimation of real and complex singular parameter mu;
  • D-K iterations for approximate mu-synthesis;

    graphical interface for closed loop response analysis;

    means of lowering the order of the model;

    direct linking of individual blocks of large systems.

The state space model can be created and analyzed based on system matrices. The package supports work with continuous and discrete models. The package has a full-fledged graphical interface, including: the ability to set the range of input data, a special window for editing properties D-K iterations and graphic representation frequency characteristics. Has functions for matrix addition, multiplication, various transformations and other operations on matrices. Provides the ability to downgrade models.

20. Stateflow

Stateflow is an event-driven systems modeling package based on finite automata theory. This package is intended to be used in conjunction with the Simulink Dynamic Systems Simulation package. In any Simulink model, you can insert a Stateflow diagram (or SF diagram) that will reflect the behavior of the components of the simulation object (or system). SF-chart is animated. By its highlighted blocks and connections, one can trace all the stages of the simulated system or device and make its work dependent on certain events. Rice. 23.6 illustrates the simulation of the behavior of the car in the event of an emergency on the road. Under the car model, you can see the SF diagram (more precisely, one frame of its work).

To create SF diagrams, the package has a convenient and simple editor, as well as user interface tools.

21. Quantitative Feedback Theory Toolbox

Quantitative Feedback Theory Toolbox

The package contains functions for creating robust (stable) systems with feedback. QFT (Quantitative Feedback Theory) is an engineering method that uses frequency representation of models to meet various quality requirements in the presence of uncertain object characteristics. The method is based on the observation that feedback is necessary in cases where some characteristics of the object are uncertain and/or unknown perturbations are applied to its input. Package features:

    evaluation of the frequency boundaries of the uncertainty inherent in feedback;

    graphical user interface that allows you to optimize the process of finding the required feedback parameters;

    functions for determining the influence of various blocks introduced into the model (multiplexers, adders, feedback loops) in the presence of uncertainties;

    support for modeling analog and digital feedback loops, cascades and multi-loop circuits;

    resolution of uncertainty in the parameters of the object using parametric and non-parametric models or a combination of these types of models.

Feedback theory is a natural continuation of the classical frequency approach to design. Its main goal is to design simple, low-order, minimum-bandwidth controllers that satisfy quality characteristics when there are uncertainties.

The package allows you to calculate various parameters of feedbacks, filters, test controllers both in continuous and discrete space. It has a user-friendly graphical interface that allows you to create simple controllers that meet the requirements of the user.

QFT allows you to design controllers that meet different requirements despite changes in model parameters. The measured data can be directly used to design controllers, without the need to identify complex system responses.

22. LMI Control Toolbox

LMI Control Toolbox

The LMI (Linear Matrix Inequality) Control package provides an integrated environment for setting and solving problems linear programming. The package, originally intended for designing control systems, allows you to solve any linear programming problems in almost any field of activity where such problems arise. Key features of the package:

    solving problems of linear programming: problems of compatibility of constraints, minimization of linear goals in the presence of linear constraints, minimization of eigenvalues;

    study of linear programming problems;

    graphic editor of linear programming tasks;

    setting limits in symbolic form;

    multicriteria design of regulators;

    stability test: quadratic stability of linear systems, Lyapunov stability, Popov criterion test for non-linear systems.

The LMI Control package contains modern simplex algorithms for solving linear programming problems. Uses a structural representation of linear constraints, which increases efficiency and minimizes memory requirements. The package has specialized tools for analysis and design of control systems based on linear programming.

With the help of linear programming problem solvers, you can easily check the stability of dynamic systems and systems with non-linear components. Previously, this type of analysis was considered too complex to implement. The package even allows such a combination of criteria, which was previously considered too complicated and solvable only with the help of heuristic approaches.

The package is a powerful tool for solving convex problems optimizations arising in areas such as control, identification, filtering, structural design, graph theory, interpolation and linear algebra. The LMI Control package includes two types of graphical user interface: the linear programming problem editor (LMI Editor) and the Magshape interface. LMI Editor allows you to set limits in symbolic form, and Magshape provides the user with convenient tools for working with the package.

23. System identification packages

System identification packages

System Identification Toolbox

The System Identification package contains tools for creating mathematical models of dynamic systems based on observed input and output data. It has a flexible graphical interface to help organize data and create models. The identification methods included in the package are applicable to a wide range of problems, from designing control systems and signal processing to analyzing time series and vibration. The main properties of the package:

    simple and flexible interface;

    data pre-processing, including pre-filtering, removal of trends and biases; О choice of data range for analysis;

    response analysis in the time and frequency domain;

    display of zeros and poles of the transfer function of the system;

    residual analysis when testing the model;

    construction of complex diagrams, such as the Nyquist diagram, etc.

GUI simplifies data preprocessing as well as the model identification dialog process. It is also possible to work with the package in command mode and using the Simulink extension. The operations of loading and saving data, selecting a range, deleting offsets and trends are performed with minimal effort and are in the main menu.

The presentation of data and identified models is organized graphically in such a way that during interactive identification, the user can easily return to the previous step of work. For beginners, it is possible to view the next possible steps. Graphical tools allow the specialist to find any of the previously obtained models and evaluate its quality in comparison with other models.

Starting by measuring the output and input, you can create a parametric model of the system that describes its behavior in dynamics. The package supports all traditional model structures, including autoregression, Box-Jenkins structure, and others. It supports linear state-space models that can be defined in both discrete and continuous space. These models may include arbitrary number inputs and outputs. The package includes functions that can be used as test data for identified models. The identification of linear models is widely used in the design of control systems when it is required to create a model of an object. In signal processing problems, models can be used for adaptive signal processing. Identification methods are also successfully used for financial applications.

24. Frequency Domain System Identification Toolbox

Frequency Domain System Identification Toolbox

The Frequency Domain System Identification package provides specialized tools for identifying linear dynamic systems by their time or frequency response. Frequency methods are aimed at identifying continuous systems, which is a powerful addition to the more traditional discrete technique. The package methods can be applied to problems such as modeling electrical, mechanical, and acoustic systems. Package properties:

    periodic perturbations, crest factor, optimal spectrum, pseudorandom and discrete binary sequences;

    payment confidence intervals amplitude and phase, zeros and poles;

    identification of continuous and discrete systems with unknown delay;

    model diagnostics, including modeling and calculation of residuals;

    converting models to the System Identification Toolbox format and vice versa.

Using the frequency approach, one can achieve the best model in the frequency domain; avoid discretization errors; it is easy to isolate the constant component of the signal; significantly improve the signal-to-noise ratio. To obtain disturbing signals, the package provides functions for generating binary sequences, minimizing the magnitude of the peak and improving the spectral characteristics. The package provides identification of continuous and discrete linear static systems, automatic generation of input signals, as well as a graphical representation of zeros and poles of the transfer function of the resulting system. Functions for testing the model include calculating residuals, transfer functions, zeros and poles, running the model using test data.

25. Additional packages MATLAB extensions

Additional MATLAB Extension Packages

Communication Toolbox

A package of applied programs for building and modeling various telecommunication devices: digital communication lines, modems, signal converters, etc. It has a rich set of models of the most various devices communications and telecommunications. Contains a number of interesting examples of modeling communication tools, such as a v34 modem, a modulator to provide single-sideband modulation, etc.

26. Digital Signal Processing (DSP) Blockset

Digital Signal Processing (DSP) Blockset

A package of applied programs for designing devices using digital signal processors. First of all, these are high-performance digital filters with a frequency response (AFC) specified or adapted to the signal parameters. The results of simulation and design of digital devices using this package can be used to build high-performance digital filters on modern digital signal processing microprocessors.

27 Fixed Point Blockset

Fixed Point Blockset

This special package is focused on modeling digital control systems and digital filters as part of the Simulink package. A special set of components allows you to quickly switch between fixed and floating point (point) calculations. You can specify 8-, 16-, or 32-bit word lengths. The package has a number of useful properties:

    use of unsigned or binary arithmetic;

    user selection of the position of the binary point;

    automatic setting of the position of the binary point;

    viewing the maximum and minimum ranges of the model signal;

    switching between fixed and floating point calculations;

    overflow correction and availability of key components for fixed-point operations; logical operators, one- and two-dimensional reference tables.

28. Packages for signal and image processing

Signal and Image Processing Packages

Signal Processing Toolbox

A powerful package for the analysis, modeling and design of devices for processing all kinds of signals, providing their filtering and many transformations.

The Signal Processing package provides extremely rich signal processing capabilities for today's scientific and technical applications. The package uses a variety of filtering techniques and the latest algorithms spectral analysis. The package contains modules for the development of linear systems and time series analysis. The package will be useful, in particular, in such areas as audio and video information processing, telecommunications, geophysics, real-time control tasks, economics, finance and medicine. The main properties of the package:

    modeling of signals and linear systems;

    design, analysis and implementation of digital and analog filters;

    fast Fourier transform, discrete cosine and other transformations;

    spectrum estimation and statistical signal processing;

    parametric processing of time series;

    generation of signals of various shapes.

The Signal Processing package is the perfect wrapper for signal analysis and processing. It uses field-proven algorithms selected according to criteria maximum efficiency and reliability. The package contains a wide range of algorithms for representing signals and linear models. This set allows the user to be flexible enough to create a signal processing script. The package includes algorithms for converting a model from one view to another.

The Signal Processing package includes a complete set of methods for creating digital filters with a variety of characteristics. It allows you to quickly design high- and low-pass filters, band pass and stop filters, multi-band filters, including Chebyshev, Yule-Walker, elliptical, and others.

The graphical interface allows you to design filters by specifying requirements for them in the drag and drop mode. The following new filter design methods are included in the package:

    a generalized Chebyshev method for designing filters with a non-linear phase response, complex coefficients, or arbitrary response. The algorithm was developed by Maclenan and Karam in 1995;

    constrained least squares allows the user to explicitly control the maximum error (smoothing);

    a method for calculating the minimum filter order with a Kaiser window;

    a generalized Butterworth method for designing low-pass filters with the most uniform pass and attenuation bands.

Based on the optimal Fast Fourier Transform algorithm, Signal Processing has unrivaled performance for frequency analysis and spectral estimation. The package includes functions for computing the discrete Fourier transform, discrete cosine transform, Hilbert transform, and other transforms commonly used in analysis, coding, and filtering. The package implements such spectral analysis methods as the Welch method, the maximum entropy method, etc.

A new graphical interface allows you to view and visually evaluate the characteristics of signals, design and apply filters, perform spectral analysis, exploring the effect of various methods and their parameters on the result. The graphical interface is particularly useful for visualizing time series, spectra, time and frequency responses, and zero and pole locations of system transfer functions.

The Signal Processing package is the basis for solving many other problems. For example, by combining it with the Image Processing package, 2D signals and images can be processed and analyzed. Together with the System Identification package, the Signal Processing package allows you to perform parametric modeling of systems in the time domain. In combination with the Neural Network and Fuzzy Logic packages, many tools can be created for data processing or classification extraction. The signal generation tool allows you to create pulse signals of various shapes.

29. Higher-Order Spectral Analysis Toolbox

Higher-Order Spectral Analysis Toolbox

The Higher-Order Spectral Analysis package contains special algorithms for signal analysis using higher order moments. The package provides ample opportunities for the analysis of non-Gaussian signals, as it contains algorithms, perhaps the most advanced methods for analyzing and processing signals. Key features of the package:

    evaluation of high-order spectra;

    traditional or parametric approach;

    amplitude and phase recovery;

    adaptive linear forecasting;

    harmonic recovery;

    delay estimation;

    block signal processing.

The Higher-Order Spectral Analysis package allows you to analyze signals corrupted by non-Gaussian noise and processes occurring in nonlinear systems. High-order spectra, defined in terms of signal high-order moments, contain additional information that cannot be obtained using only autocorrelation or signal power spectrum analysis. High-order spectra allow:

    suppress additive color Gaussian noise;

    identify non-minimum-phase signals;

    highlight the information due to the non-Gaussian nature of the noise;

    detect and analyze non-linear properties of signals.

Possible applications of high-order spectral analysis include acoustics, biomedicine, econometrics, seismology, oceanography, plasma physics, radar and locators. The core features of the package support high-order spectra, cross spectral estimation, linear prediction models, and lag estimation.

30. Image Processing Toolbox

Image Processing Toolbox

The Image Processing suite provides scientists, engineers and even artists with a wide range of tools for digital image processing and analysis. Closely tied to the MATLAB application development environment, the Image Processing Toolbox frees you from time-consuming coding and debugging of algorithms, allowing you to focus on solving the main scientific or practical task. The main properties of the package:

    restoration and selection of image details;

    work with a selected area of ​​the image;

    image analysis;

    linear filtering;

    image conversion;

    geometric transformations;

    increase the contrast of important details;

    binary transformations;

    image processing and statistics;

    color transformations;

    palette change;

    converting image types.

The Image Processing package provides ample opportunities for creating and analyzing graphic images in the MATLAB environment. This package provides an extremely flexible interface for manipulating images, interactively developing graphics, visualizing datasets, and annotating results for white papers, reports, and publications. Flexibility, combination of package algorithms with such a feature of MATLAB as a matrix-vector description make the package very well adapted for solving almost any tasks in the development and presentation of graphics. Examples of using this package in the MATLAB system environment were given in lesson 7. MATLAB includes specially designed procedures to increase the efficiency of the graphical shell. In particular, the following features can be noted:

    interactive debugging when developing graphics;

    profiler to optimize the execution time of the algorithm;

    tools for building an interactive graphical user interface (GUI Builder) to speed up the development of GUI templates, allowing you to customize it for user tasks.

This package allows the user to spend significantly less time and effort on creating standard graphics and thus concentrate on important details and image features.

MATLAB and the Image Processing package are maximally adapted for the development, implementation of new ideas and user methods. To do this, there is a set of interfaced packages aimed at solving all sorts of specific tasks and tasks in an unconventional setting.

The Image Processing package is currently used extensively by over 4,000 companies and universities around the world. At the same time, there is a very wide range of tasks that users solve using this package, such as space research, military development, astronomy, medicine, biology, robotics, materials science, genetics, etc.

31 Wavelet Toolbox

The Wavelet package provides the user with a complete set of programs for studying multidimensional non-stationary phenomena using wavelets (short wave packets). Relatively recently created methods of the Wavelet package extend the user's capabilities in those areas where the Fourier decomposition technique is usually used. The package can be useful for applications such as speech and audio signal processing, telecommunications, geophysics, finance and medicine. The main properties of the package:

    advanced graphic user interface and a set of commands for analysis, synthesis, filtering of signals and images;

    conversion of multidimensional continuous signals;

    discrete signal conversion;

    decomposition and analysis of signals and images;

    a wide range of basis functions, including correction of boundary effects;

    batch processing of signals and images;

    analysis of signal packets based on entropy;

    filtering with the ability to set hard and soft thresholds;

    optimal signal compression.

Using the package, you can analyze features that other signal analysis methods miss, i.e. trends, outliers, breaks in high-order derivatives. The package allows you to compress and filter signals without obvious losses, even in cases where you need to save both high and low frequency components of the signal. There are also compression and filtering algorithms for batch signal processing. Compression programs allocate the minimum number of coefficients that represent the original information most accurately, which is very important for the subsequent stages of the compression system. The following wavelet basis sets are included in the package: Biorthogonal, Haar, Mexican Hat, Mayer, etc. You can also add your own bases to the package.

An extensive user manual explains how to work with package methods, with numerous examples and a full reference section.

32. Other application packages

Other application packages

Financial Toolbox

Quite relevant for our period of market reforms is a package of applied programs for financial and economic calculations. It contains many functions for calculating compound interest, bank deposit operations, calculating profits and much more. Unfortunately, due to numerous (although, in general, not very fundamental) differences in financial and economic formulas, its use in our conditions is not always reasonable - there are many domestic programs for such calculations, for example, Accounting 1C. But if you want to connect to the databases of financial news agencies - Bloom-berg, IDC through the Datafeed Toolbox MATLAB package, then, of course, be sure to use the financial MATLAB extension packages.

The Financial package is the basis for solving many financial problems in MATLAB, from simple calculations to full blown distributed applications. The Financial package can be used to calculate interest rates and profits, analyze derivative income and deposits, and optimize an investment portfolio. Key features of the package:

    data processing;

    dispersion analysis of the effectiveness of the investment portfolio;

    time series analysis;

    calculation of profitability of securities and evaluation of rates;

    statistical analysis and market sensitivity analysis;

    calculation of annual income and calculation of cash flows;

    depreciation and depreciation methods.

Given the importance of the date of a particular financial transaction, the Financial package includes several functions for manipulating dates and times in various formats. The Financial package allows you to calculate prices and returns when investing in bonds. The user has the ability to set non-standard, including irregular and non-coinciding with each other, schedules for debit and credit operations and the final settlement when repaying bills. Economic sensitivity functions can be calculated taking into account different maturities.

Algorithms of the Financial package for calculating cash flow indicators and other data reflected in financial accounts make it possible to calculate, in particular, interest rates on loans and credits, profitability ratios, credit receipts and final accruals, evaluate and predict the value of an investment portfolio, calculate depreciation indicators etc. Package functions can be used taking into account positive and negative cash flows (cash-flow) (excess of cash receipts over payments or cash payments over receipts, respectively).

The Financial package contains algorithms that allow you to analyze the investment portfolio, dynamics and economic sensitivity factors. In particular, when determining the efficiency of investments, the functions of the package make it possible to form a portfolio that satisfies the classical problem of G. Markowitz. The user can combine the package's algorithms to calculate Sharpe ratios and rates of return. Analysis of dynamics and economic sensitivities allows the user to identify positions for straddle trades, hedging and fixed rate trades. The Financial package also provides extensive opportunities for the presentation and presentation of data and results in the form of graphs and charts traditional for the economic and financial fields of activity. Cash can be displayed in decimal, banking and percentage formats at the user's request.

33. Mapping Toolbox

The Mapping package provides a graphical and command interface for analyzing geographic data, displaying maps, and accessing external geographic data sources. In addition, the package is suitable for working with many well-known atlases. All these tools, in combination with MATLAB, provide users with all the conditions for productive work with scientific geographic data. Key features of the package:

    visualization, processing and analysis of graphic and scientific data;

    more than 60 map projections (direct and inverse);

    design and display of vector, matrix and composite maps;

    graphical interface for building and processing maps and data;

    global and regional data atlases and interfacing with high resolution government data;

    geographic statistics and navigation functions;

    three-dimensional representation of maps with built-in highlighting and shading;

    converters for popular geographic data formats: DCW, TIGER, ETOP5.

The Mapping package includes more than 60 of the most widely used projections, including Cylindrical, Pseudocylindrical, Conic, Polyconic and Pseudoconic, Azimuth and Pseudoazimuth. Front and rear projections are possible, as well as non-standard projection types specified by the user.

In the Mapping package card any variable or set of variables that reflects or assigns a numerical value to a geographic point or area is called. The package allows you to work with vector, matrix and mixed data maps. Powerful GUI provides interactive work with maps, for example, the ability to move the pointer to an object and click on it to get information. MAPTOOL GUI is a complete development environment for map applications.

The most widely known atlases of the world, United States, astronomical atlases are included in the package. The geographic data structure simplifies the extraction and processing of data from atlases and maps. The digital chart of the world (DCW), TIGER, TBASE and ETOP5 formats geographic data structure and external geographic data interfacing features come together to provide a powerful and flexible tool for accessing current and future geographic databases. Careful analysis of geographic data often requires mathematical methods that work in a spherical coordinate system. The Mapping package provides a subset of geographic, statistical, and navigational functions for analyzing geographic data. The navigation features provide ample opportunity to perform movement tasks such as positioning and route planning.

34. Power System Blockset

Data Acquisition Toolbox and Instrument Control Toolbox

Data Acquisition Toolbox - an extension package related to the field of data acquisition through blocks connected to the internal bus of a computer, function generators, spectrum analyzers - in a word, instruments widely used for research purposes to obtain data. They are backed by an appropriate computing base. New block Instrument Control Toolbox allows you to connect instruments and devices with serial and Channel interfaces. common use and VXI.

36. Database toolbox and Virtual Reality Toolbox

Database toolbox and Virtual Reality Toolbox

The speed of the Database toolbox has been increased by more than 100 times, with the help of which information is exchanged with a number of database management systems via ODBC or JDBC drivers:

  • Access 95 or 97 Microsoft;

    Microsoft SQL Server 6.5 or 7.0;

    Sybase Adaptive Server 11;

    Sybase (formerly Watcom) SQL Server Anywhere 5.0;

    IBM DB2 Universal 5.0;

  • Computer Associates Ingres (all editions).

All data is pre-converted to a cell array in MATLAB 6.0. In MATLAB 6.1, you can also use an array of structures. The Visual Query Builder allows you to create arbitrarily complex queries in the SQL dialects of these databases, even without knowledge of SQL. Many heterogeneous databases can be opened in one session.

The Virtual Reality Toolbox package is available starting with MATLAB 6.1. Allows for 3D animation and animation, including Simulink models. Programming language - VRML - virtual reality modeling language (Virtual Reality Modeling Language). The animation can be viewed from any computer equipped with a VRML-enabled browser. Confirms that mathematics is the science of quantitative relationships and spatial forms of any real or virtual worlds.

37.Excel Link

Allows you to use Microsoft Excel 97 as the MATLAB I/O processor. To do this, just install the excllinkxla file supplied by Math Works as an add-in function in Excel. In Excel, you need to type Service > Add-Ins > Browse, select a file in \matlabrl2\toolbox\exlink directory and install it. Now, every time you start Excel, the MATLAB command window will appear, and the Excel control panel will be supplemented with getmatrix, putmatrix, evalstring buttons. To close MATLAB from Excel, just type =MLC1ose() in any Excel cell. To open after executing this command, you must either click on one of the getmatrix, putmatrix, evalstring buttons, or type in Excel Tools> Macro>Run mat! abi ni t. By selecting a range of Excel cells with the mouse, you can click on getmatrix and type in the name MATLAB variable. The matrix will appear in Excel. Once you've populated a range of Excel cells with numbers, you can select the range, click on putmatrix, and enter a MATLAB variable name. The operation is thus intuitive. Unlike MATLAB, Excel Link is not case sensitive: I and i, J and j are equivalent.

Call demo examples of expansion packs.

Top Related Articles