
MATLAB, which stands for Metrics Laboratory, is a programming language and computing environment designed to handle large matrices and teach linear algebra, enabling matrix manipulation, plotting, algorithms, and user interfaces.
Explore MATLAB's graphical user interface, focusing on four main parts—the ribbon, command window, workspace, and current folder—and learn navigation and basic operations like creating variables and scripts.
Learn MATLAB variable naming rules and how to create variables in the command window. Understand why using predefined constants and functions can cause conflicts and how to resolve them.
Explore MATLAB's numeric data types, including double and single floating point, their ranges, and how to create typed variables with int and unsigned int using conversion functions and class function.
Explore non-numeric data types in Matlab, including logical booleans, structs with nested fields, cell arrays, characters, and tables, with examples of creating, indexing, and inspecting data types.
Explore how MATLAB treats data as arrays, from scalars to matrices. Create numeric arrays with square brackets and separators to form row vectors, column vectors, and matrices.
Explore MATLAB functions to generate matrices and arrays, including ones, zeros, rand, linspace, and repmat, and learn reshaping with reshape and creating ranges with the colon operator.
Explore MATLAB cell arrays that hold mixed data types in a single container, and learn tables with named rows and columns, ages, heights, weights, blood pressure, and character arrays.
Combine row and column arrays to form larger matrices in MATLAB, ensuring compatible dimensions, with rows aligning for vertical merges and columns aligning for horizontal merges.
Explore basic arithmetic operations on arrays and matrices in Matlab, including element-wise operations with .* and ./ and transpose, as well as standard matrix multiplication and dimension rules.
Explore MATLAB element-wise relational operations that compare corresponding elements across arrays and matrices using operators like greater than, less than, equal to, not equal to, yielding logical true or false.
Explore logical operations in Matlab by applying gates such as and, or, not, nand, xor, and xnor to data, producing true or false matrices.
Explore MATLAB indexing techniques, including suppressing output with semicolons, creating matrices, and single, range, and end-based indexing, plus logical indexing for conditional data extraction.
Explore cell array indexing in Matlab, using curly braces and parentheses to access values, including nested structs and the differences between vector and cell indexing.
Demonstrates reshaping a 1–100 10×10 matrix, computing the remainder modulo two to classify even/odd, converting to logical, and reconstructing matrices with odd values or zeros.
Learn MATLAB functions like all, any, sum, prod, min, and max to extract information from arrays and matrices using the column operator for column-wise checks, including values greater than 50.
Generate a 6x6 matrix of random values between x and y (15 to 61); scale to 0–46, round, shift by x to 15–61, verify with min, max, equals checks.
Explore character arrays in MATLAB, using contains, replace, and count to manipulate text without altering the original, and concatenate with square brackets while sizing with size and length.
Explore complex numbers in MATLAB, from five plus two i to seven plus 3.8 g, and apply functions like sine, cosine, and exponential; extract real and imaginary parts.
Create and run MATLAB scripts to automate tasks beyond the command window, using the ribbon and editing area to save and execute commands, including random matrices with min and max.
Split a large MATLAB script into smaller scripts, save them with distinct names, and call one script from another to run commands consecutively, using percent signs for documentation.
Learn how to create user defined functions in MATLAB, pass inputs, return outputs, and reuse code by calling functions within scripts and other functions.
Explore how MATLAB uses a base workspace and a separate function workspace, use breakpoints to debug, and generate integer random matrices within a function.
Learn to exchange data between the base workspace and a function with evalin and assignin, display variables across workspaces, and export values to the base workspace.
Explore how to execute commands based on a condition and how to repeat actions until a condition is fulfilled, guided by flow control in Matlab, Simulink, and Stateflow.
Explore how if statements in MATLAB execute commands based on conditions, such as any value in a random matrix being greater than 50, with else and default cases.
Master flow control with the switch statement, testing a variable for exact values using cases like yes or no, and optionally calling functions or executing scripts within each case.
Learn how MATLAB's for loop repeats a code block over an array, displaying messages as k ranges from 1 to 10 or 5 to 13, using k as index.
Explore how a while loop controls repetition by a defined condition, updating the loop variable to avoid infinite loops, with examples of different increments and outcomes in MATLAB.
Learn to exit loops with the break statement in Matlab, applying it to for and while loops by using a condition like key equals 21 to break the innermost loop.
Explore a MATLAB example that uses for and while loops, if statements, and switch inside a loop, processing characters to identify vowels, with sections and run section controls.
Visualize large data sets by creating 2D or 3D graphs and charts in MATLAB, including line, area, pie, and histogram visualizations.
Learn to create 2d line plots in MATLAB by defining a piecewise function of x, plotting with the plot command, and customizing styles, colors, markers, and axes.
Learn how to build and customize pie charts in MATLAB by counting occurrences of values from 0 to 5, computing percentages, and using the explode option to highlight slices.
Learn to create 3D plots in MATLAB with plot3 using x, y, z vectors to form 3D line or spiral. Adjust view, range, and point density for rotation and smoothness.
Learn to create 3d surface plots from matrices using surf and mesh grid, form x and y grids, set z = x*exp(-x^2-y^2), and customize edges and colors; color bar.
Explore how MATLAB interfaces with external files, with a focus on Excel workbooks and text files.
Read and write Excel data for MATLAB using table, cell arrays, and structs to extract system data from Excel sheets and create parameter structs.
Learn how to interface with text files in MATLAB by opening, reading with fscanf, searching with contains, and writing with fprintf, while handling units like degrees Celsius.
Build a table with named columns and rows, and index data by row and column names using the current operator. Extend to multidimensional arrays and use size function to inspect.
Save and load workspace variables in MATLAB with scripts or map files to reuse data. Manage paths with set path and addpath, and locate files using which and whos.
Explore Simulink, a MATLAB based graphical programming environment for modeling, simulating, and analyzing multi-domain dynamical systems. Assemble graphical blocks to build interdomain simulations, opened from MATLAB via the Simulink button.
Explore the Simulink graphical user interface, including the ribbon and the simulation area, where you add blocks to build and run systems. Inject inputs and monitor outputs to execute simulations.
Builds a simple sine wave model in Simulink, connects to a scope, runs the simulation, and adjusts amplitude, offset, frequency, and phase.
Configure solver options, start/stop times, delta t and sampling in MATLAB Simulink to control simulation smoothness, with fixed or variable step solvers and integration methods like Euler and Dormand-Prince.
Derive and simulate a mass–spring–damper system in matlab and simulink, solving m x'' = F - k x - c x' with an integrator and a sine input.
Compare dynamical system solutions across differential equations, continuous and discrete transfer functions, and difference equations using Laplace transforms with zero initial conditions.
Convert a differential system to a discrete difference equation using sampling time dt, mapping x dot and x double dot to x(n-1), x(n-2), and implement with Simulink blocks.
Use a discrete transfer function via the z-transform of the difference equation to relate input F to output X and ease model parameterization.
Define parameters in the MATLAB workspace and let Simulink assign them to blocks, avoiding hardcoded values and enabling easy model updates while comparing discrete and continuous simulations at sample times.
the lecture presents the discrete transfer function as the final representation, comparing it with the difference equation and the z-transform form, showing their numerical similarity under sampling, using four methods.
Explore how Simulink determines execution order among blocks in a closed-loop system using data dependencies and initial values, with integrators, unit delays, transfer functions, gains, and constants.
Explore the Simulink library and core blocks—integrators, transfer functions, delays, and arithmetic—and learn to navigate libraries and toolboxes for modeling continuous and discrete systems.
Explore the continuous sub library, including derivative and various integrator blocks (simple, second order, limited), and configure PID and transfer function blocks with tuning options.
Explore discontinuities in Simulink blocks using saturation with fixed and dynamic limits, observe input bounding, dead zones producing zero output, and limiters adapting to changing signals.
Explore discrete signal processing with unit delay and delay blocks, zero-order hold, discrete derivatives, filters, PID controllers, and discrete transfer functions, plus external reset and initial condition options.
Explore bitwise operations in Simulink, applying and, or, and bitwise operators to each array element across ports. Use unit delay and a constant block to compare values and detect changes.
Explore how lookup tables compute outputs from inputs using x-axis breakpoints and y-axis table data; choose dimensions, input ranges, interpolation, extrapolation, and search strategies, including dynamic lookup table variants.
Explore basic math operations in Matlab, Simulink and Stateflow, including absolute, addition, gain, product, inverse, square root, and subtraction. Learn about negative of a signal, approximation, and ports and subsystem.
Learn signal routing in Matlab Simulink by gathering and splitting signals with max and vector concatenate, and using bus creator and bus selector to manage data memory and dot notation.
Explore how to set and convert data types in Simulink and MATLAB, using external and internal methods, including data type conversion blocks, saturation, and inheritance rules.
Learn to create and use Simulink and MATLAB functions, including function prototypes, input/output arguments, data types, and examples like y = f(u) and a sine wave.
Explore destination blocks in Simulink, including scope, display, to workspace, to file, and x c graph, and learn to save simulation data as time series.
Explore the sources sub library in Simulink, where signal clock, counters, pulse generator, ramp, step, and signal builder generate, visualize, and configure signals without inputs.
Explore Simulink subsystems, compare virtual and atomic subsystems, and learn how to create, organize inputs and outputs, and control execution order within a model.
Explore how virtual and atomic subsystems influence execution order in a mass-spring-damper model, showing that virtual subsystems permit flexible ordering while atomic subsystems execute as a single block.
Learn how atomic subsystems disrupt execution order and cause algebraic loop errors in a feedback model; convert to virtual or non-atomic subsystems to restore displacement without changing the sine response.
Explore flow control in Simulink with enabled subsystems that execute when the enable port is true, and compare hold versus reset behavior and initial values.
Trigger the triggered subsystem on rising or falling edges with a trigger block, using the signal builder to define the edge and execute the sample when triggered.
Practice if condition flow control by routing inputs through action subsystems using expressions, a measure block to select the active path, and a signal builder for tests.
Explore how the MATLAB, Simulink switch case subsystem routes a single input through multiple cases and a default, producing x and x prime outputs.
Understand the enable the triggered subsystem in Matlab, where an enable and a trigger signal control execution, with edge types and options for initial values and outputs.
Demonstrate resettable flow control in a Simulink subsystem by resetting an integrator to three on rising edges and on falling edges, using a sine input and a signal builder.
Explore flow control with for iterator and while iterator subsystems in Simulink, including iteration limits, indexing, and memory accumulation across samples.
Function call subsystems execute based on a function code triggered periodically, such as every 3 seconds, or by conditional criteria, similar to a trigger subsystem.
Use a variant subsystem in MATLAB Simulink to run one of four variants per simulation. Create a variant control expression and activate variants via the variant manager.
Use the model explorer to view open models and their model workspace, update base workspace parameters, attach data to models, run simulations, and explore blocks, subsystems, and variant control components.
Explore how reusability in simulink enables using a subsystem or model across projects through model references and libraries, with linked blocks, parameter injection, and propagation of changes.
Parameterize a custom PID library in Simulink by masking a subsystem, exposing KP, KI, KD and a cut-off frequency through a dialog and edit boxes.
Model a DC motor as an electromechanical system with electrical and mechanical parts linked by back emf and torque, simulated in Simulink to study voltage-driven speed.
Demonstrates configuring a motor control model with an external input voltage and a constant torque, includes model reference and speed output omega, and applies pid control.
Develop and tune a pid controller for a dc motor using a model reference block, exploring reference speed tracking, gain tuning, and practical hardware constraints via simulation.
Visualize simulation results with the data inspector by logging signals, organizing into layered axes, and comparing runs using colors, cursors, and time-based navigation.
Master Simulink debugging by stepping forward and back through a sine wave multiplied by two, using run, pause, stop, and conditional breakpoints, with a display block and adjustable step size.
Explore the signal table and property inspector to view and edit block parameters, signals, and states, and trace signals to sources and destinations with go to and from.
Explore Stateflow, a controlled logic toolbox from MathWorks that uses state machines and flowcharts to model active systems, with transitions, conditions, actions, default actions, and looping logic, linking to Simulink.
Explore the basic elements of state flow, including states, transitions, a default starting point, actions, junctions, and the data driving transitions and a flow graph.
Design a Stateflow-based state machine for an air conditioning system, with on/off transitions driven by input U, output Y, and entry, during, and exit actions, plus basic simulation.
Demonstrate a state machine that transitions between off and on using entry and during actions, with y reflecting state. Configure a counter, limit, and 0.05s sample time to control transitions.
Explore temporal actions in Stateflow by using after, before, at, and every with on in states to trigger outputs like y2 and y3 at defined sample intervals.
Explore how Stateflow handles more complex transitions using conditional and temporal logic, including multiple transitions with priorities, before/after timing, and during actions, to create on/off pulse behavior.
Stateflow language uses MATLAB syntax for actions, with MATLAB or C options; simulate to view a diagnostic window and use semicolons to set the limit to 16 or 32.
Explore substate design inside a super state in Stateflow, modeling an air conditioner with on/off as the parent and cold, hot, dry, and wet as substates with transitions.
Explore using a history junction inside a super state to preserve the last active substate when exiting and re-entering a state in Matlab Stateflow.
Introduce variables u, v, w, and x in a Stateflow chart, add dummy states, and compare external and internal self-transitions and history junction effects.
Learn how parallel states enable multiple active states in Stateflow, contrast with exclusive execution, and organize complex behavior with sub charts and readable layouts using a heat and fan example.
Explore advanced Stateflow actions, including exit actions, temporal actions on, after, and before transitions, and condition actions, and learn to coordinate parallel states with local variables and transition actions.
Describe how a flow graph in Stateflow models condition-based paths with junctions and transitions, using x, z, and data to determine actions across every sample.
Explore how to embed a flow graph inside a state to control transitions and actions, using entry and during logic, internal transitions, and temporal conditions.
explore stateflow transitions with junctions and multiple segments, including condition and transition actions, and learn best practices like placing the transition action at the last segment.
Explore graphical patterns in flow graphs, using if and else, for and while loops, and switch case structures to model control logic in Matlab, Simulink, and Stateflow.
Set scope to control local variables in Stateflow, making counter visible only in fan or mean; use Model Explorer to adjust visibility and ensure no unresolved symbols.
Detect input changes to trigger state transitions using has changed to or has changed from, ensuring smooth on/off transitions in matlab, simulink, and stateflow.
Learn how Stateflow events drive transitions and actions, with triggered subsystems, rise/fall edge triggers, and broadcasted events to targeted states and external Simulink models.
Broadcast events per parallel state to keep scope local, use fan to route, and apply dot mutation to broadcast across parallel states, ensuring actions trigger correctly.
Introduce truth tables with inputs and outputs, organized as a condition table and an action table, to determine the maximum of four inputs through comparisons, decisions, and don't care cases.
Explore three Stateflow function types—graphical, signaling, and MATLAB—showing how to define and use them like in Simulink, with local and chart variables, inputs, and outputs.
Learn to embed simulink blocks in stateflow charts, create atomic and parallel simulink states, manage inputs, outputs, and interfaces, and handle local variables and transitions for parallel execution.
Analyze the execution flow of actions, condition checks for transitions, and event handling in a machine with two parallel states and nested sub-states, covering internal and external transitions.
At time zero, state one and state two activate in parallel with default states; entry actions run for state one and state three, while others have none.
Explore how a case handles no event broadcasts, false conditions except C3, and resulting execution flow through state 111 and state two one one, including during actions and conditional branches.
We repeat the initial part of the sub case and mark two false. Then three is true, routing to a path where nothing executes, with the rest unchanged.
Explores a stateflow style interrupt-driven state machine, detailing condition checks, during and entry actions, and an event E two broadcast that moves from state one to state two.
Explore case 3 in a stateflow model, tracing active states and transitions driven by conditions seven, c three, c two, with e1, e2, e3, e4 broadcasts and during entry actions.
Demonstrates a stateflow case from the second circuit case, showing exit and entry actions and during actions across parallel states, with a broadcast event e5 and potential infinite loops.
Trace how stateflow case 4 navigates states 111, 112, and 212, evaluates conditions ten and eleven, executes E2 and E3 during actions, and handles a junction default.
Case 5 demonstrates stateflow style transitions, evaluating conditions C14, C12, C13 and events E3, E9, E1 to drive state changes and during actions, highlighting careful event handling.
Case 6 dissects state transitions in a Stateflow chart, showing how active states, during actions, and entry and exit actions respond to condition checks and internal self-transitions.
Analyze a Stateflow case where condition checks and events drive transitions, execute exit and entry actions, and broadcast events across states.
Case 8 of Matlab, Simulink and Stateflow demonstrates a sequence of state transitions driven by event e3, with broadcasts, condition checks, and corresponding entry and exit actions.
Trace case 9's stateflow sequence, where events e seven and e six drive state activations and transitions, with c13, c six, and c14 guiding the flow.
Explore how to design robust state machines in Matlab, Simulink, and Stateflow by analyzing conditions, events, and transitions, including entry and exit actions, to avoid infinite loops and runtime errors.
Explore debugging Stateflow simulations by visualizing active states and transitions, stepping through execution, and using breakpoints to pause on transitions, entries, or exits.
Log signals and local variables in the state machine using the data inspector to monitor on/off transitions during simulation, enabling flexible logging in Simulink or Stateflow.
An introductory course for the most powerful tools in scripting, simulating dynamical systems and model based design and designing statemachines.
Matlab which is one of the most widely used scripting language with its capabilities in array manipulation, handling graphics and interacting with files is being explained in a simple and easy way without the need of any programming background.
All basic elements of the language is introduced starting from the basics of the interface up to creating complicated scripts and user defined functions.
Simulink which is the most commonly used tool for simulating dynamical systems and control system design and verification, Also the best tool to depend on when dealing with model based design concepts for control systems, is being discussed step by step starting from the GUI, through knowing the basic blocks and creating complicated models for dynamical systems ending with comparison for many simulations involving control system design example.
Stateflow as the best tool to use to design the simplest and also the most complicated state machines to represent reactive systems like operational modes and handling triggers in a simple graphical representations is being taught starting from a simple example for a statemachine and the more you continue, the more challenging it gets and hence the need for investigation and debugging.
Starting with the basic elements of stateflow like state, transition, action,..., going to having having complicated states, sub-states and parallel states and the tricks of dealing with events specially among parallel states.