Following this link may get you blocked.

Introduction to Programming in Matlab

Intro to Matlab: Matlab IDE, Scripts, & Functions

Required Matlab Settings

  • Go to Home tab –> Preferences –> Editor/Debugger –> Tab
    • Set Tab size: 2
    • Set Indent size: 2
    • Uncheck “Tab key inserts spaces” if it is checked.
    • Check “Emacs-style Tab key smart indenting”
  • Enter disp(tempdir()) in Matlab command window to find out your temporary directory. Make a note of the result.
  • Go to Home tab –> Preferences –> Editor/Debugger –> Backup Files
    • Set Location to “Single directory” and enter the path of your temporary directory.
  • Go to Editor tab –> click on the arrow underneath the Run icon –> make sure “Pause on Errors” is selected.
 

While Loop

 

For Loops

 

Cells

 

Structs