O'Reilly logo

Programming in MATLAB ® by Ram N. Patel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7

Using Memory Efficiently

After studying this chapter, you should be able to:

  • avoid “Out of Memory” errors
  • do efficient coding to improve the performance of your program
  • make use of preallocation for effective memory usage

7.1 Introduction

Efficient use of memory is essential for large-scale applications that originate in various disciplines like image processing, numerical solutions, simulations, neural network learning, and many others. Understanding memory concepts of MATLAB® can help run large programs faster and solve many “Out of Memory” errors.

We begin with a surprising note that adding more RAM or a larger hard disk might not solve “Out of Memory” problems. Each computer has a physical memory (i.e., RAM) and a portion of hard disk ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required