Implementation of logic and digital systems
MATLAB

It is an integrated environment for scientific calculations, which contains a powerful graphics and computational tools. It is primarily intended for technical computing, data visualization and analysis, development and testing of algorithms, data acquisition and processing, signal and image processing, programming and creating custom applications. The advantage of this environment is that it contains a number of tools that allow researchers to focus on solving the problem, not the syntax.

For this purpose MATLAB contains tools:

- Computer tools and development environment,
- Library of mathematical functions,
- Language MATLAB,
- MATLAB Graphics,
- Eternal interface.

Fig. 3.12: Main MATLAB screen

## The location in the directory and the current version

By default, after installing the program is located in the directory: "c: \ Program Files \ MATLAB \ R2012b \ *. *" For each version. The current version is version No. 8 Folder "R2012b" is a trading name of the installed update. Every year, two distributed updates, spring, marked with the letter "a", autumn, marked with the letter "b". Installing the new update will not overwrite the old one, but it creates a new folder:

    c:\Program Files\MATLAB\R2012a\*.*
    c:\Program Files\MATLAB\R2012b\*.*

The current version is found then sends a command to the command line:

Fig. 3.13: Actual version detection
Fig. 3.14: Structure for MATLAB environment

MATLAB is modular and allows for expansion in various areas of computing. The base is expanded library of MATLAB tools labeled as "toolboxes". The oldest and most common toolbox is "Simulink", which allows the simulation of dynamic systems. Expanding Simulink is made of "Block set" libraries usable blocks. Diagram expansion MATLAB is shown in Figure 3.14.

MATLAB documentation is very extensive, and therefore occurs only in electronic form. Documentation contains a basic description of the function and syntax, examples, notes on new releases and printable documentation in "puff" format. The documentation is organized by category and alphabetically.

## Example of solution

For example, solutions, and outcomes were selected sample solution voltage and current in a series RLC circuit. The calculation was performed numerical differentiation and integration, and the results shown in the charts below, Table 3.15.

Fig. 3.15: Example for numerical solution results

## SIMULINK

The purpose is to extend SIMULINK of MATLAB basic superstructure which will allow calculations of the dynamic behavior of systems environments using block diagrams. For a system described by differential or difference equations, a mathematical model is created using predefined blocks. These blocks are arranged in libraries. These libraries are divided into so-called Blockset:

- Simscape (basic library),
- SimDriveline,
- SimHydraulics - Blockset solution for hydraulic systems and mechanisms,
- SimMechanics,
- SimPowerSystems - Blockset solutions for high-voltage electrical systems.

Fig. 3.16: Simulink libraries

Blockset "Commonly Used Blocks" offers the most frequently used blocks.

Fig. 3.17: Blockset example

For a comparable example was chosen sample solution dynamic behavior of RLC circuit as in the previous case. Given integro-differential equation was modeled using predefined blocks, the window on the right side of the picture and the course of the unit step response is displayed on the screen oscilloscope window on the left of picture 3.18.

Fig.3.18: Example solution for system behaviour in time