diff --git a/content/courses/matlab-machine-learning/_index.md b/content/courses/matlab-machine-learning/_index.md index 0cb9a9db..29d750c2 100644 --- a/content/courses/matlab-machine-learning/_index.md +++ b/content/courses/matlab-machine-learning/_index.md @@ -14,7 +14,7 @@ menu: weight: 1 --- -# Overview +## Overview This short course focuses on data analytics and machine learning techniques in MATLAB® using functionality within Statistics and Machine Learning Toolbox™ and Neural Network Toolbox™. The course demonstrates the use of unsupervised learning to discover features in large data sets and supervised learning to build predictive models. Examples and exercises highlight techniques for visualization and evaluation of results. Topics include: diff --git a/content/courses/matlab-programming/_index.md b/content/courses/matlab-programming/_index.md index 0527b713..56ea0258 100644 --- a/content/courses/matlab-programming/_index.md +++ b/content/courses/matlab-programming/_index.md @@ -21,9 +21,9 @@ Participants must have a Mathworks account in order to access the links to the o **Matlab Academy:Fundamentals of Matlab** +**Video of Fundamentals of Matlab** -**Video: Fundamentals of Matlab** -**Quick Reference Guide (used for presentation)** +**Quick Reference Guide** diff --git a/content/courses/matlab-programming/getting_started.md b/content/courses/matlab-programming/getting_started.md index fbbb16ed..89f1ecbd 100644 --- a/content/courses/matlab-programming/getting_started.md +++ b/content/courses/matlab-programming/getting_started.md @@ -19,7 +19,8 @@ menu: ### Getting Data into Matlab -**Video: Import Tool** +**Video: Import Tool** + **Exercise: Using the Variable Editor** @@ -27,7 +28,7 @@ menu: ### Obtaining Help -**Video: Using MATLAB's Documentation** +**Video: Using MATLAB's Documentation** **Exercise: Open and Use Function Documentation** diff --git a/content/courses/matlab-programming/techniques.md b/content/courses/matlab-programming/techniques.md index af3490a3..388b3a1e 100644 --- a/content/courses/matlab-programming/techniques.md +++ b/content/courses/matlab-programming/techniques.md @@ -10,18 +10,24 @@ menu: parent: Effective MATLAB Programming --- -# Matlab Programming Review +## Matlab Programming Review The section is a review of the basic programming constructs presented in the **Matlab Fundamentals** tutorial. -## Logical operations +### Logical operations + +If expression, statements, end evaluates an expression, and executes a group of statements when the expression is true. An expression is true when its result is nonempty and contains only nonzero elements (logical or real numeric). Otherwise, the expression is false. + +The elseif and else blocks are optional. The statements execute only if previous expressions in the if...end block are false. An if block can include multiple elseif blocks. + +This information is derived from the documentation linked below.
**[Documentation: if,elseif,else](https://www.mathworks.com/help/matlab/ref/if.html)** **[Exercise: Logical Operations](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlbe#chapter=8&lesson=2§ion=2)** -## Decision Branching +### Decision Branching {{< figure src="/courses/matlab-programming/branching1.png" >}}
@@ -32,7 +38,7 @@ The section is a review of the basic programming constructs presented in the **[Exercise: Using switch-case](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlbe#chapter=14&lesson=3§ion=10)** -## For Loops +### For Loops **[Video: For Loops](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlbe#chapter=14&lesson=5§ion=2)** @@ -40,9 +46,10 @@ The section is a review of the basic programming constructs presented in the {{< figure src="/courses/matlab-programming/forLoop1.png" >}}

+ **[Exercise: Looping Through a Vector](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlbe#chapter=14&lesson=5§ion=6)** -## While Loops +### While Loops To use a for loop, you need to know in advance how many iterations are required. If you want to execute a block of code repeatedly until a result is achieved, you can use a while-loop.

@@ -55,14 +62,16 @@ To use a for loop, you need to know in advance how many iterations are required.
**[Exercise: Finding eps](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlbe#chapter=14&lesson=6§ion=7)** -## Creating and Calling Functions +### Creating and Calling Functions
+ **[Slide: Creating and Calling Functions](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlbe#chapter=15&lesson=2§ion=1)**

{{< figure src="/courses/matlab-programming/function1.png" >}}

+ **[Exercise: Create and Call a Function](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlbe#chapter=15&lesson=2§ion=4)** **[Slide: Creating Functions Files](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlbe#chapter=15&lesson=3§ion=2)** @@ -79,30 +88,35 @@ To use a for loop, you need to know in advance how many iterations are required. {{< figure src="/courses/matlab-programming/function3.png" >}}

-# Storing Heterogeneous Data -## Matlab Data Types +## Storing Heterogeneous Data + +### Matlab Data Types
+ **[Slide: MATLAB Data Types](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=2&lesson=1§ion=1)** **[Exercise: Creating Variables of a Specific Data Type](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=2&lesson=1§ion=3)** -## Table Basics +### Table Basics
+ **[Documentation: Tables](https://www.mathworks.com/help/matlab/ref/table.html)** **[Exercise: Create a Table from Workspace Variables](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=2&lesson=2§ion=1)** -## Extracting Data from a Table +### Extracting Data from a Table
+ **[Exercise: Extracting Data from a Table: Dot Notation](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=2&lesson=5§ion=1)** **[Exercise: Extracting Data from a Table: Curly Braces](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=2&lesson=5§ion=2)** -## Cell Array Basics +### Cell Array Basics
+ **[Documentation: Cell Arrays](https://www.mathworks.com/help/matlab/ref/cell.html)** **[Exercise: Creating and Concatenating Cell Arrays](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=2&lesson=6§ion=1)** @@ -110,9 +124,10 @@ To use a for loop, you need to know in advance how many iterations are required. **[Exercise: Cell Array Extraction](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=2&lesson=7§ion=1)** -## Structures +### Structures
+ **[Documentation: Structures](https://www.mathworks.com/help/matlab/ref/struct.html)** **[Exercise: Create a Structure and Access Fields](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=2&lesson=8§ion=1)** @@ -121,11 +136,12 @@ To use a for loop, you need to know in advance how many iterations are required. -# Structuring Heterogeneous Data +## Structuring Heterogeneous Data -## Structuring Data Considerations +### Structuring Data Considerations
+ **[Slide: Structuring Data Considerations](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=1§ion=1)** **[Exercise: Cell Array](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=1§ion=3)** @@ -134,8 +150,9 @@ To use a for loop, you need to know in advance how many iterations are required. **[Exercise Table](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=1§ion=8)** -## Extracting Multiple Elements from Cell and Structure arrays +### Extracting Multiple Elements from Cell and Structure arrays
+ **[Slide: Gathering Output](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=2§ion=2)** **[Exercise: Multiple Elements from a Cell Array](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=2§ion=4)** @@ -143,8 +160,9 @@ To use a for loop, you need to know in advance how many iterations are required. **[Exercise: Multiple Elements from a Structure Array](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=2§ion=3)**
-## Function Handles +### Function Handles
+ **[Using Function Handles](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=3§ion=1)** **[Exercise: Optimization](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=3§ion=4)** @@ -155,6 +173,7 @@ To use a for loop, you need to know in advance how many iterations are required.


+ **[Video: Applying Scalar Functions to Arrays](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=4§ion=2)** **[Exercise: Applying Functions to Groups](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=4§ion=3)** @@ -162,16 +181,18 @@ To use a for loop, you need to know in advance how many iterations are required. **[Exercise: cellfun Basics](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=4§ion=8)** -## Converting Data Types +### Converting Data Types
+ **[Slide: Converting Data Types](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=5§ion=1)** **[Exercise: Numeric to Cell Array](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=5§ion=2)** **[Exercise: Converting Strings](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=3&lesson=5§ion=5)** -# Managing Data Efficiently +## Managing Data Efficiently
+ **[Slide: Datatypes and Memory](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=4&lesson=1§ion=1)** **[Quiz 1](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=4&lesson=1§ion=2)** @@ -184,76 +205,86 @@ To use a for loop, you need to know in advance how many iterations are required. **[Exercise: Preallocation Experiment](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=4&lesson=2§ion=5)** -## Vectorization +### Vectorization
{{< figure src="/courses/matlab-programming/vectorization1.png" >}} {{< figure src="/courses/matlab-programming/vectorization2.png" >}} -## Copy-on-write with Function Parameters +### Copy-on-write with Function Parameters
+ **[Slide: Copy-on-write Behavior](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=4&lesson=6§ion=1)** -## In-place Optimizations +### In-place Optimizations
+ **[Slide: In-place Optimizations](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=4&lesson=7§ion=1)** -## Nested Functions +### Nested Functions {{< figure src="/courses/matlab-programming/nestedFunction1.png" >}}
+ **[Slide: Nested Functions](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=4&lesson=8§ion=2)** **[Exercise: Create a Nested Functions](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=4&lesson=8§ion=5)** -# Creating Flexible functions +## Creating Flexible functions
+ **[Video: Creating Flexible Function Interfaces](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=1§ion=1)** -## Creating Multiple Interfaces with Wrapper Functions +### Creating Multiple Interfaces with Wrapper Functions
+ **[Slide: Separating the Interface from the Algorithm](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=2§ion=1)** **[Exercise: Create a Wrapper Function with a Fixed Interface](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=2§ion=3)** -## Setting Default Input Values +### Setting Default Input Values
+ **[Slide: Setting Default Input Values](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=5§ion=1)** -## Missing Input Arguments +### Missing Input Arguments
+ **[Slide: Missing Input Arguments](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=5§ion=2)** **[Slide: Empty Input Arguments](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=5§ion=6)** **[Exercise: Skipping the Input](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=5§ion=7)** -## Allowing Any Number of Inputs +### Allowing Any Number of Inputs
+ **[Slide: Functions with a Variable Number of Inputs](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=6§ion=1)** **[Slide: Variable Length Input Argument List](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=6§ion=2)** **[Slide: Passing Argument Lists to Another Function](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=6§ion=6)** -## Allowing a Variable Number of outputs +### Allowing a Variable Number of outputs
+ **[Slide: Defining Different Behaviors Based on Outputs](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=8§ion=1)** **[Exercise: Matrix or Vector Output](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=8§ion=2)** -## Changing the Function Interface with Anonymous Functions +### Changing the Function Interface with Anonymous Functions
+ **[Slide: Modifying Function Interfaces](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=9§ion=1)** **[Slide: Wrapping Functions with Anonymous Functions](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=9§ion=2)** @@ -264,77 +295,86 @@ To use a for loop, you need to know in advance how many iterations are required. **[Exercise: Change Function Interface with an Anonymous Function](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=5&lesson=9§ion=5)** -# Creating Robust Applications +## Creating Robust Applications -## Restricting Access Using Private Functions +### Restricting Access Using Private Functions {{< figure src="/courses/matlab-programming/privateFunction1.png" >}}
+ **[Slide: Making Functions Private](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=6&lesson=2§ion=2)**

{{< figure src="/courses/matlab-programming/privateFunction2.png" >}} -## Writing Local Functions +### Writing Local Functions {{< figure src="/courses/matlab-programming/localFunction1.png" >}} {{< figure src="/courses/matlab-programming/localFunction2.png" >}} {{< figure src="/courses/matlab-programming/localFunction3.png" >}} -## Comparison of Functions +### Comparison of Functions {{< figure src="/courses/matlab-programming/compareFunction1.png" >}}
+ **[Exercise: Create Local Functions](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=6&lesson=3§ion=4)** -## Validating Function Inputs +### Validating Function Inputs {{< figure src="/courses/matlab-programming/validateInput1.png" >}} {{< figure src="/courses/matlab-programming/validateInput2.png" >}}
+ **[Quiz](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=6&lesson=5§ion=4)** -# Verifying Application Behavior +## Verifying Application Behavior -## Why Use a Testing Framework? +### Why Use a Testing Framework?
+ **[Video: Why Use a Testing Framework](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=7&lesson=1§ion=1)** -## What is a Test +### What is a Test {{< figure src="/courses/matlab-programming/test1.png" >}}
+ **[Slide: Elements of a Test](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=7&lesson=2§ion=1)** -### "is" Functions +#### "is" Functions {{< figure src="/courses/matlab-programming/isFunction.png" >}}
+ **[Exercise: isequal Versus ==](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=7&lesson=2§ion=3)** -### Test Response +#### Test Response {{< figure src="/courses/matlab-programming/assertFunction.png" >}}
+ **[Exercise: assert](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=7&lesson=2§ion=5)** -## Writing and Running a Test Script +### Writing and Running a Test Script {{< figure src="/courses/matlab-programming/testScript1.png" >}} -### Writing a Test Script +#### Writing a Test Script {{< figure src="/courses/matlab-programming/testScript2.png" >}}
+ **[Exercise: Write a Test Script](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=7&lesson=3§ion=3)** -### Running a Test Script +#### Running a Test Script
+ **[Slide: Running a Test Script](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=7&lesson=3§ion=4)** **[Exercise: Run a Test Script](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=7&lesson=3§ion=5)** @@ -342,48 +382,55 @@ To use a for loop, you need to know in advance how many iterations are required. **[Exercise: Fix Broken Tests](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=7&lesson=3§ion=8)** -# Utilizing Development Tools +## Utilizing Development Tools -## Developing and Maintaining Code +### Developing and Maintaining Code {{< figure src="/courses/matlab-programming/devTools1.png" >}} -## Folder Reports +### Folder Reports
+ **[Slide: Folder Reports](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=8&lesson=2§ion=2)** -## Errors and Debugging + +### Errors and Debugging
+ **[Video: Different Kinds of Errors](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=8&lesson=3§ion=1)** -## Code Analyzer +### Code Analyzer {{< figure src="/courses/matlab-programming/codeAnalyzer1.png" >}}
+ **[Slide: Suppressing and Fixing Code Analyzer Warnings](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=8&lesson=4§ion=2)** **[Exercise: Remove Code Analyzer Warnings](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=8&lesson=4§ion=6)** -## Debugging Runtime Errors +### Debugging Runtime Errors {{< figure src="/courses/matlab-programming/debugRun1.png" >}}
+ **[Slide: Debugging Run-Time Errors](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=8&lesson=5§ion=3)** -## Measuring Performance +### Measuring Performance {{< figure src="/courses/matlab-programming/performance1.png" >}}
+ **[Slide: Tic and Toc](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=8&lesson=6§ion=2)** -## Finding Bottlenecks +### Finding Bottlenecks {{< figure src="/courses/matlab-programming/bottleneck1.png" >}}
+ **[Video: The MATLAB Profiler](https://matlabacademy.mathworks.com/R2019a/portal.html?course=mlpr#chapter=8&lesson=7§ion=2)** diff --git a/content/notes/matlab-parallel-programming/matlab-parallel-programming_1.md b/content/notes/matlab-parallel-programming/matlab-parallel-programming_1.md index cf780df5..94cb87b0 100644 --- a/content/notes/matlab-parallel-programming/matlab-parallel-programming_1.md +++ b/content/notes/matlab-parallel-programming/matlab-parallel-programming_1.md @@ -27,7 +27,7 @@ However, the challenge lies in effectively utilizing this powerful hardware, whi - **Accelerate workflows** with minimal changes to existing code - **Scale applications** seamlessly from desktop to clusters or cloud for more computational power and memory -{{< figure src=/notes/matlab-parallel-programming/img/matlab-gpu-multicore-cpu.png >}} +{{< figure src="/notes/matlab-parallel-programming/img/matlab-gpu-multicore-cpu.png" >}} Let's look at some examples of customer across multiple industries who have been using MathWorks parallel computing tools and why they chose parallel computing @@ -36,13 +36,13 @@ Let's look at some examples of customer across multiple industries who have been --- -| {{< figure src=/notes/matlab-parallel-programming/img/automotive-test-analysis.png width="300px" >}} | {{< figure src=/notes/matlab-parallel-programming/img/discrete-model-fleet-performance.png width="300px" >}} | +| {{< figure src="/notes/matlab-parallel-programming/img/automotive-test-analysis.png" width="300px" >}} | {{< figure src="/notes/matlab-parallel-programming/img/discrete-model-fleet-performance.png" width="300px" >}} | |:-----------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------:| | **Automotive Test Analysis and Visualization** | **Discrete-Event Model of Fleet Performance** | | - 3–4 months of development time saved | - Simulation time reduced from months to hours | | - Validation time sped up 2X | - Simulation time sped up 20X | -| {{< figure src=/notes/matlab-parallel-programming/img/heart-transplant-studies.png width="300px" >}} | {{< figure src=/notes/matlab-parallel-programming/img/derived-market-data.jpg width="300px" >}} | +| {{< figure src="/notes/matlab-parallel-programming/img/heart-transplant-studies.png" width="300px" >}} | {{< figure src="/notes/matlab-parallel-programming/img/derived-market-data.jpg" width="300px" >}} | |:-----------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------:| | **Heart Transplant Studies** | **Calculating Derived Market Data** | | - 4 weeks reduced to 5 days | - Implementation time reduced by months |