Training Course in MATLAB

This self-paced video training provides a faster and more flexible way to learn MATLAB for Simulink and Stateflow Users. The course is intended for beginners and those who want to refresh their skills in writing automation scripts for model simulation and test. No programming experience is required. The practical knowledge and essential features are presented in a didactically structured way. The trainee gains MATLAB expertise naturally while viewing and repeating the instructions. This training is a prerequisite for the Simulink course.

ML 1: Training Requirements (02:50)

  • Self-paced learning set-up
  • How to benefit most from it?
  • Methodology & Best Practices
  • Course outline

What can you expect from this MATLAB training?

The self-paced video training Introduction to MATLAB for Simulink users was designed for those who understand the value of know-how for successful career transformation and consider their time to be the most valuable resource. Our insights, ideas and strategies will help you to learn in one weekend what might take your peers months or even years in real working life. This training will also save you the cost of time-off, travel, and other expenses.

What do you need to start with this MATLAB training?

We'll present you the practical knowledge in a deductively structured way, but please be prepared for this video training. You will need a MATLAB installation on your personal computer to do the exercises. You will need an internet access to view the self-paced video training. And we also suggest an extra monitor for video playback, so you do not need to switch between both views.

How to benefit most from this MATLAB training?

Please repeat all instructions in this training to assure maximum learning and retention. Pause the video to explore relevant features in MATLAB and replay the parts you did not quite understand. After several repetitions of this material spread over a period of time, you will become an expert in MATLAB.

What topics will be covered in this MATLAB training?

We have a tight agenda. First, we'll talk about importing and visualizing data in MATLAB. We'll explore data types and methods of data manipulation. We'll automate data manipulation over scripting. We will use functions for data encapsulation. We'll talk about advanced programming techniques. We'll test and debug MATLAB code and then try to speed it up. And then we'll create custom graphical user interfaces. So basically, we'll do all the things that you need to create any application in MATLAB. This is much more than what a regular Simulink user knows about MATLAB. So, you will be considered an expert in MATLAB after this course. Good luck!

Please note: this is a transcript of the training video above.

ML 2a: Importing and visualizing data in MATLAB (12:02)

  • Introduction to MATLAB
  • Starting MATLAB
  • Reading data sets from file
  • Saving and loading variables
  • Plotting multiple columns

What will be covered in this chapter?

In this chapter, we'll discuss what is MATLAB and how to start it, how to generate and plot data, how to import existing data from files, and how to export data - all very useful things in everyday work.

What do you get with MATLAB?

Desktop tools and development environment helps working with MATLAB functions and files via graphical user interface (GUI). Mathematical function library is a great collection of computational algorithms including elementary functions, and more sophisticated ones like matrix inverse, or fast Fourier transform (FFT). The MATLAB language is a higher-level matrix-oriented language with all programming features you can imagine. MATLAB graphics support two-dimensional and three-dimensional data visualization and allow you to build complete graphical user interfaces for your MATLAB applications. MATLAB also provides external interfaces library that allows you to write programs that interact with MATLAB or call legacy code. Let's start MATLAB!

How to open MATLAB?

Open MATLAB by double clicking on the MATLAB icon. By default, MATLAB displays a user interface with the command window to enter MATLAB commands, the workspace browser to display MATLAB variables, the current directory browser to display files in the current folder and navigate over the folder structure of the operating system, and the command history viewer to record your work history. So, let's explore some possibilities...

Please note: this is a short transcript of the training video above.

ML 2b: Importing and visualizing data in MATLAB (15:20)

  • Customizing plots
  • Generating plot function
  • Creating shortcuts
  • Writing data to Excel-file
  • Getting help

How to import data in MATLAB?

We already discussed how to import data using the right-mouse click and Import Wizard. The same way, we can use the function UI-Import. It's providing the same functionality, only with the difference that we can call it as a MATLAB function, choosing the MATLAB file and do exactly the same that we did just with the right-mouse click. Now we have the data inside.

How to use Variable Editor?

So, if I double-click on the data, I can see all the data available in the variable editor. And now if I try to pull out all the data, I see that the graphics is kind of not really nice-looking. Why is that? In MATLAB the data will be plotted column-wise not row-wise. So, that's why we have this data-set in the column one and then in the column two, three, five and so on. It does not look so nice as you see. How can we change it?

How to plot rows versa columns?

We can change it by plotting the data in another way. We can plot it using the function plot and we can transpose the data. So, the data will be seen as two columns, and then we can plot it. So just to show you what these two columns are, let's see that. I call it “my_data”; is equal to data transposed. And now we see that we get two columns, right? So, if I double-click on “my_data”, we have two columns. We can choose all the data and plot it and then we have exactly the same view as we want. So, this is pretty nice and now we see that MATLAB works column-wise and not row-wise.

How to enhance the plots with legends and markers?

So, let's discuss what we can do with this graph. In our case, we want to have some kind of name over here. We want to have names for axis y and for axis x. And we want some kind of a nice way to show all these dots over here to have markers for all the data because the data is basically interpolated. So, all the dots that we have in the data are just connected with the line. So, we want to see all the markers in there. And we want to see the legends for both this and the other graphs saying something like this is the “measurement point one” and “measurement point two”. So, let's do that. The easiest way of doing this is to use the plot tools provided with MATLAB…

Please note: this is a short transcript of the training video above.

ML 3: Data types and methods of data manipulation (29:00)

  • Integers, Strings, Cells, Structures
  • Methods of data manipulation
  • Indexing types in MATLAB
  • Calculations with matrices
  • Using MATLAB documentation

Request Password

ML 4: Automation of data manipulation (Scripting) (14:00)

  • Creating script files
  • Running scripts
  • Comments for documentation
  • Cell mode for easy debugging
  • Publishing MATLAB code

Request a Password

ML 5: Using Functions for data encapsulation (17:00)

  • Creating & calling functions
  • Debugging for function insight
  • Subfunctions & workspaces
  • Precedence order
  • MATLAB path

Request a Password

ML 6: Advanced programming techniques (20:00)

  • Scripts versa functions
  • Flow control and loops
  • Catching runtime errors
  • Defensive programming
  • Protecting intellectual property

Request a Password

ML 7: Debugging and speeding up MATLAB Code (09:00)

  • Debugging MATLAB code
  • Using Breakpoints and stack view
  • Improving MATLAB performance
  • Stopwatch timer & profiler utility
  • Memory pre-allocation & re-use

Request a Password

ML 8a: Creating custom graphical user interface (GUI) (06:00)

  • Import Wizard and Plot Tools
  • Introduction to Handle Graphics
  • Inspecting graphical objects
  • Relation of figure and function
  • Manipulating figure properties

Request a Password

ML 8b: Creating custom graphical user interface (GUI) (20:00)

  • Plan & design of GUI in GUIDE
  • Properties of UI controls
  • Call-back functions
  • Passing handles-structure
  • Completion of custom GUI

Request a Password

Ready for the Training Course in Simulink? Need for more MATLAB insight? Even more?