Created with MATLAB R2022a. Compatible with MATLAB R2022a and later releases.
2023 © John Ekoru (University of the Witwatersrand, Academic Development Unit, Faculty of Engineering and the Built Environment)
This teaching package contains content for the course “Introduction to Programming in MATLAB”, consisting of the following:
- A set of MATLAB Live Scripts arranged by topic, to be completed over a 6-week period.
- A set of complementary PowerPoint presentations.
The content of this package is targeted towards both undergraduate and postgraduate students who are first-time/novice programmers. MATLAB is a programming and numeric computing platform developed by MathWorks.
The intention of this package is to gradually introduce students to the basics of Programming in an accessible manner, providing both theoretical underpinnings along with guided demonstration and practical exercises. This is made possible by making use of MATLAB Live Scripts which incorporate text, visual aids as well as links to videos and other multimedia instructional content.
It is expected that students who complete this course will have been provided a sufficient foundation to delve into areas requiring intermediary and advanced programming skills using MATLAB including such as Machine Learning, Shallow Neural Networks, Deep Learning, etc. In addition to that, provide students the necessary skills to provide access to the varied analysis and synthesis tools available MATLAB are important in several science and engineering courses which include but not limited to such at Control systems, Design of Measurement systems, Modelling, simulation and analysis of system response, Mechatronics, Flight dynamics and control, Signals and Systems, Telecommunications systems, Process control and optimization, Numerical methods, Electronics, Electric Power Systems etc.
If you are new to MATLAB, please take the following free online training entitled MATLAB Onramp in order to get familiar with language.
-
For every week there is a set of MATLAB Grader exercises divided into two levels of complexity. Those exercises are not given and can be shared only upon request.
-
The content has been fully embedded into a Learning Management System, aka LMS, that for the particular course held at the University of the Witwatersrand is Ulwazi (an LMS based in Canvas). In fact, MATLAB content as well as MATLAB Grader problems, can be easily integrated into Canvas and many other LMS like Moodle, D2L Brightspace, Sakai, Blackboard, etc.
-
The University of the Witwatersrand has a Campus Wide License which enables every staff members, students, and visitors to use the full suite of MATLAB products. This makes easy access to the tools to every students from everywhere in the world. Students can use MATLAB directly in the web browser with MATLAB Online which is connected to MATLAB Drive, which gives every students 20Gb of space in the cloud.
-
Students were encouraged to take Online Training like MATLAB Onramp and MATLAB Fundamentals to better prepare them for projects involving components in MATLAB as well as final exams.
Learn to plot multidimensional data |
Understand control flow structures in MATLAB |
Simulate dynamic models in MATLAB Simulink |
---|
Create Multivariable plots |
Learn multiple methods to import data into MATLAB |
---|
Gain insight into Matrix Manipulation |
Develop functions and understand how they work |
Learn to create plots that help you understand the data better |
---|
The course content can be approached in one of two ways:
- Click on the Open in MATLAB Online button at the top of this readme file to access the content online in your web browser.
- By following the included PowerPoint presentations: Begin by opening the introductory Live Script and follow the presentation
Each Live Script contains instructions that will guide you step-by-step through the set activities and exercises.
Live scripts are divided into sections and contain Interactive Live Script Controls which include buttons, checkboxes, sliders, etc. Feel free to interact with these controls as well as typing in your own code snippets. You can run each section within a Live Script individually.
To activate Live Script Controls, run the script manually by making use of the Run section (to run a section) or Run all sections. This will enable you to see the results. Initially, when you open a script, the Live Script controls are not active which means that you have to run the script (or section) manually in order to see results.
There is a link to the complementary PowerPoint Presentation at the end of every Live Script.
Whenever teaching/learning is approached using PowerPoint Presentations, a link to the complementary Live Script can be found on the last slide of every presentation.
The table below indicates all the content made arranged by week, topic, and content type:
A list of all links to all the Live Scripts is given below:
- Week_0_Course_Content_and_Instructions.mlx
- Week_1_Part_1_Fundamentals.mlx
- Week_1_Part_2_Fundamentals.mlx
- Week_1_Part_3_Fundamentals.mlx
- Week_1_Part_4_Fundamentals.mlx
- Week_1_Part_5_Fundamentals.mlx
- Week_1_Part_6_Fundamentals.mlx
- Week_1_Part_7_Fundamentals.mlx
- Week_1_Part_8_Fundamentals.mlx
- Week_2_Part_1_Arrays_and_Matrices.mlx
- Week_2_Part_2_Relational_and_Logical_Operators.mlx
- Week_3_Part_1_Control_Flow_Structures.mlx
- Week_3_Part_2_Control_Flow_Structures.mlx
- Week_4_Part_1_Inputs_and_Outputs.mlx
- Week_4_Part_2_Inputs_and_Outputs.mlx
- Week_5_Part_1_Functions_and_Graphing.mlx
- Week_5_Part_2_Functions_and_Graphing.mlx
- Week_5_Part_3_Functions_and_Graphing.mlx
- Week_6_Part_1_Bigger_Picture.mlx
- Week_6_Part_2_Interoperability_Solution.mlx
- Week_6_Part_3_Beyond_Introduction_to_Programming_Solution.mlx
- MATLAB Fundamentals
- Creating arrays and operations on arrays
- Introduction to relational and logical operators
- Distinguish between For and While loops and their applications
- Using vectorization to replace loops
- Introduction to various data input and output methods
- Learn to import data from various structured and unstructured data types
- Interactive or Programmatic approach to plotting data
- Formatting plots
- Creating and calling functions
- Debugging and error-handling
- Introduction to computational thinking
- Interoperability of MATLAB with other programming languages
- Introduction to Symbolic Math, Object-Oriented Programming and Simulink
Since this is an introductory course, there are no prerequisites and no prior programming experience is assumed.
MATLAB Onramp - Learn the essentials of MATLAB through this free, two-hour introductory tutorial on commonly used features and workflows.
We invite educators interested in this course material to go through the resources links provided below:
- Featured Courseware
- Teach with MATLAB and Simulink
- MATLAB Grader
- Feel free to contact me with your feedback, my email is [email protected]
Do you have any questions or feedback? Contact the MathWorks online teaching team.
Week_0_Contents_and_instructions.pptx
The license for this module is available in the LICENSE file in this repository.
This Curriculum Module was developed through the support of MathWorks. Special thanks to:
- Dr. Marco Rossi from MathWorks,
- Prof. Rodney Genga, Warren Carlson, James Braid and Dr Yuval Genga from the University of the Witwatersrand
- and Dr. Jon Esteves, Jessica Mia Rivombo, Kamo Segoje and Hazel Chieza from Opti-Num Solutions (Pty).