%%  034IN "Fundamentals of Automatic Control" - Introduction to MATLAB
%
% Table of Contents
% What is MATLAB?
% Using MATLAB as a student enrolled in the class 034IN at the DIA Dept. of the University of Trieste
% What is MATLAB for in the 034IN "Fundamentals of Automatic Control" course?
% What this Document is not.
% Online Courses
% Programming in MATLAB
% Using LaTeX to Write Mathematical Formulas
% The Live Scripts Collection
% Instructions
%
%% What is MATLAB?
%
% MATLAB is a high-performance language for technical computing, integrating computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation [excerpt from the MATLAB documentation].
% Typical uses include
% Mathematics and computation;
% Algorithm development;
% Modeling, simulation, and prototyping;
% Data analysis, and visualization;
% Matlab is an interactive system whose default data type is a double-precision multidimensional array (recall: a matrix is a bidimensional array). It means the elements of the array are, by default, real numbers, coded as "floating point, double precision real numbers" according to IEEE Standard 754. Using such a multidimensional array does not require a preliminary datatype definition or declaration. This allows you to solve many technical computing problems, especially those with matrix and vector formulations, in a fraction of the time it would take to write a program in a classic scalar non-interactive language such as C or Fortran. For the record, MATLAB was originally created to access software developed by the LINPACK and EISPACK, and later LAPACK.
%
%% Using MATLAB as a student enrolled in the class 034IN at the DIA Dept. of the University of Trieste
%
% MATLAB is installed on the computers in the Computer Labs of the Dept. of Architecture & Engineering at the University of Trieste. Moreover, the University of Trieste has subscribed to a MATLAB TAH (Total Academic Headcount) license that allows students (as well as professors and university staff) to download the software and install it on their PCs. For more details regarding the available products and how to download and activate the software, please visit the dedicated MathWorks web portal.
%
% If you are installing MATLAB on your PC, please note that you need the following products in order to be able to execute any live script or function during the course:
% MATLAB (of course);
% Symbolic Math Toolbox;
% Control Systems Toolbox
% This set of toolboxes is strictly required. You may install any other toolbox you like, together with these in the list.
% To install new toolboxes, you can either
% perform the installation of the preferred toolboxes during the installation of the main MATLAB product, using the MathWorks Installer. Please, visit the MathWorks web portal for more details regarding the available products and how to download and activate the software;
% use the Add-On Explorer in MATLAB. For instructions on installing products using the Add-On Explorer, see the following video: https://www.mathworks.com/videos/add-on-explorer-106745.html
%%
%% What is MATLAB for in the 034IN "Fundamentals of Automatic Control" course?
%
% During the course lectures, we will show how to make profitable use of MATLAB and some of its toolboxes to solve problems of performance analysis of dynamic systems, evolution of dynamic systems and design of proper control laws. At the end of the course, you will be able (using MATLAB):
% to proficiently analyze the performance of dynamic systems in the continuous-time domain in a deterministic setting;
% to design and implement continuous-time control algorithms for linear dynamic systems;
% to convert an already designed continuous-time controller into a discrete-time one, by selecting a suitable sampling period and applying a simple discretization technique.
%
%% What this Document is not.
% This collection of live scripts is NOT a complete documentation on MATLAB, nor a complete guide on any of the topics analyzed. It is a quick overview of the main topics needed to use MATLAB profitably in solving the problems addressed and solved in this course.
%
%% Online Courses
% Online MATLAB Courses:  https://it.mathworks.com/support/learn-with-matlab-tutorials.html
%% Programming in MATLAB
% Some tips and guidelines for comprehensible, easy-to-maintain and efficient code:
% MATLAB Style Guidelines 2.0 provide guidance on variable names, functions and programming style;
% Guidelines for writing clean and fast code in MATLAB advise on how to obtain comprehensible and efficient code;
% Programming style guidelines: good programming practices, brought into the MATLAB environment.
%% Using LaTeX to Write Mathematical Formulas
% LaTeX is a typesetting system well suited to producing scientific and mathematical documents of high typographical quality. A simple formulas editor for the creation and editing of mathematical formulas, based on LaTeX, is embedded  into the MATLAB Live Editor. Thus, it is a good idea to get acquainted on LaTeX, in particular on how to write a mathematical formula: Chapter 3 of the following book is a very good starting point: The Not So Short Introduction to LaTeX (Or LaTeX in 280 minutes).
%% The Live Scripts Collection
% Part 1 - Starting MATLAB
% Part 2 - Numbers, Arithmetic Operations, Formats and Variables
% Part 3 - Vectors & Matrices
% Part 3A - Application: Solving Linear Algebra Equations
% Part 4 - Symbolic Math Computations
% Part 4L-1 - The Laplace Transform
% Part 4L-2 - Applications of the Laplace Transform
% Part 4A-2 - Application: Solving Linear Algebra Equations
% Part 5 - Visualization and Programming
% Part 6 - LTI Systems
% Part 7 - Nonlinear Systems
%
%% Instructions
%
% Work your way through the pages of this set of live scripts, using the links to navigate through the various addressed topics. It would be best if you did them in order initially, but you can return to any of them when you need to refresh your memory. You can also export this live script (and any other live script of this collection) as a document in PDF or HTML format. Please pay attention: exporting the live script does not preserve the capability of inserting a MATLAB command or a piece of code directly in the live script, obtaining the result directly in the script itself.
% Hint: Have these live scripts open directly in MATLAB so you can quickly try all the examples as you work through the scripts.
%
%
%
%
%
%