☕
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. 1. Crashcourse

Graphical User Interface

This section will familiarise yourself with the Graphical User Interface and basic actions such as executing a command.

PreviousIntro to CrashcourseNextEssential commands

Last updated 5 years ago

Was this helpful?

Executing commands

In MATLAB you can execute commands either by directly entering them into the command window or by executing them from the script editor.

The most common way to execute commands is while working on a script/program (called .m file). After opening a (new) script in MATLAB, enter the commands into the script editor, then execute single commands by right-clicking on them and choosing "Evaluate" or run your whole script by clicking "Run". A good tip is to always start your script with the following three commands that will clear your workspace, close any open plots and clear the console.

clear all; close all; clc;

Alternatively, you can execute commands by directly typing them into the command window and hitting the return key (Enter) on your keyboard to evaluate them. This is very useful e.g. for trying out commands, opening help/documentation on a command or performing one-time actions such as manually exporting data.

Executing a command from the script editor
Executing a command from the Command Window