Skip to content
MathWorks

Self-Paced Online Courses

  • Self-Paced Content
  • MathWorks
  • MATLAB Help Center
  • Community
  • Learning
  • Get MATLAB MATLAB
  • Sign In
    • My Account
    • My Community Profile
    • Link License

    • Sign Out
  • Contact MathWorks Support
  • Visit mathworks.com
  • Online Courses
MathWorks MathWorks

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

  • (English)
  • (Deutsch)
  • (Français)
  • (简体中文)
  • (English)

You can also select a web site from the following list

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文
    • English
  • 日本 (日本語)
  • 한국 (한국어)

Contact your local office

image for course MATLAB Coding Practices for Efficiency and Performance

MATLAB Coding Practices for Efficiency and Performance

Take your MATLAB coding skills to the next level by learning to write efficient and performant code. Learn how to identify bottlenecks, increase efficiency through vectorization and preallocation, and examine memory usage.

Course modules

Introduction

Familiarize yourself with the course.

Lessons:
  • Course Overview
  • Learning Outcomes and Prerequisites

Measure Performance

Learn how to measure the performance of your code through timing.

Lessons:
  • Timing Code
  • Using tic and toc
  • Test Your Knowledge

Find Bottlenecks

Locate pieces of your code that take a long time to run.

Lessons:
  • The MATLAB Profiler
  • Profile Code with the MATLAB Profiler
  • Test Your Knowledge

Vectorization

Learn how to write efficient code through vectorization.

Lessons:
  • Vectorization
  • Vectorized Operations
  • Using Vectorized Operations
  • Implicit Expansion
  • Write More Efficient Code using Implicit Expansion

Memory Usage

Use common techniques for improving performance when storing, accessing, and processing data.

Lessons:
  • Data Types and Memory
  • Determine the Memory of a Variable
  • Choose a Heterogeneous Data Type
  • Specialized Data Types
  • Choose a Data Type
  • Memory Usage
  • Test Your Knowledge

Preallocation

Enhance coding efficiency by preallocating arrays.

Lessons:
  • What is Preallocation?
  • Preallocate Different Data Types
  • Preallocate a Numeric Array
  • Preallocate Structure and Cell Arrays
  • Test Your Knowledge

Conclusion

Learn next steps and provide feedback on the course.

Lessons:
  • Summary
  • Additional Resources
  • Survey

Format:Self-paced

Language:English

Language

  • Hands-on exercises with automated feedback
  • Access to MATLAB through your web browser
  • Shareable progress report and course certificate

Calculations with Vectors and Matrices

Apply mathematical and statistical operations to vectors and matrices.

Programming Constructs

Explore programming constructs like if-else, switch-case, for, and while.

A Tour of MATLAB Data Types

Familiarize yourself with the various data types in MATLAB and choose the right one for your application.

  • Trust Center
  • Trademarks
  • Privacy Policy
  • Preventing Piracy
  • Application Status
  • Contact Us

© 1994-2025 The MathWorks, Inc.