☕
An Introduction to MATLAB
  • An Introduction to MATLAB
  • Where do I start?
  • 1. Crashcourse
    • Intro to Crashcourse
    • Graphical User Interface
    • Essential commands
      • Matrix Input and Access
      • Matrix Algebra
      • Logical Operations
    • Best practices
    • Self-Assessment
    • Applied exercises
  • 2. MATLAB Programming
    • Intro to MATLAB Programming
    • Programming Fundamentals
    • Conditions
    • Loops
    • Custom Functions
    • Debugging
    • Applied Exercises
  • 3. Data, Graphics & Reporting
    • Intro to Data, Graphics & Reporting
    • Working with Datasets
    • Creating Graphs
    • Applied Exercises
  • 4. RNGs & Simulations
    • Intro to RNGs & Simulations
    • Random Number Generation
    • Monte-Carlo Simulations
    • Applied Exercises
  • 5. Numerical Methods
    • Intro to Numerical Methods
    • Numerical Optimization
    • Numerical Solvers
    • Applied Exercises
Powered by GitBook
On this page

Was this helpful?

  1. 2. MATLAB Programming

Intro to MATLAB Programming

In this chapter, you will familiarise yourself with the basics of programming i.e. Control-Flow, Custom Functions and Debugging, both abstractly and in MATLAB.

PreviousApplied exercisesNextProgramming Fundamentals

Last updated 5 years ago

Was this helpful?

We start this section with an abstract introduction into the Fundamentals of Programming. You will learn about the basic tools for control flow such as conditions and loops. The initial treatment of this is abstract and written in pseudo-code.

After this, we will dive into the basics of Control Flow in MATLAB, building on the logical operators you have already learned in the 'Getting Started' section. Flow control allows us to write more complex programs by dividing the code into code blocks which are only executed when certain conditions are met or executing code block multiple times with different parameters i.e. creating loops.

Next, we will discuss how to write custom functions that allow us to execute code blocks in a dynamic way depending on the inputs to avoid repetitions (DRY principle) and provide abstraction.

We conclude with a very brief overview of Debugging in MATLAB.

Programming Fundamentals
Conditions
Loops
Custom Functions
Debugging