Topic outline
-
Module 4 - For- and While- loops and If statements
Module 3 - Arrays
Learning Objectives/Outcomes
By the end of this module you will be able to:
- Use sequence controls- for, while, if-else
- Create a for- loop to repeatedly execute statements a fixed number of times.
- Create a while- loop to execute commands as long as a certain condition is met.
- Use relational and Boolean operators
- Use if-else constructions to change the order of execution.
- Understand the purpose of count variables.
To help you master this topic we have a series of activities for you to complete over a 1 week period. Please allow at least 2 hours to complete these activities. All links will open in a new window.
READING
Read Section 5 of your Introduction to MATLAB booklet. If you have any questions about variables within MATLAB, please raise this in this discussion forum.DEMONSTRATION
Watch this video presentation of working with Control Loops MATLAB (40 min). If you have any questions about this video, please raise this in this discussion forum.PRACTICAL
Your practical will allow you to utilise sequence control commands in MATLAB such as Loops and For- While and If Statements. If you have any questions about this practical, please raise this in this discussion forum. Create a response document using this word document template. Submit your work for formative feedback.