Skip to main content
Logo image

Subsection Common Beginner Mistakes

When first using MATLAB, it is common to encounter confusing results due to a few predictable mistakes.
  • Forgetting that MATLAB executes commands in the order they are run, not the order they appear on the screen.
  • Assuming MATLAB automatically updates previously computed values when a variable changes.
  • Leaving old variables in the workspace and unintentionally reusing them.
  • Interpreting the symbol = as a mathematical equation rather than an assignment.
Nearly all of these issues can be resolved by clearing the workspace and re-running commands in a logical order. The next section shows how scripts let you save that logical order as reusable code.