Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6528851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:34:24+00:00 2026-05-25T09:34:24+00:00

Possible Duplicate: MATLAB: maximum pre-allocated size? Is there a size limitation on creating a

  • 0

Possible Duplicate:
MATLAB: maximum pre-allocated size?

Is there a size limitation on creating a matrix in MATLAB? If so, where can I locate this information?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:34:25+00:00Added an answer on May 25, 2026 at 9:34 am

    Memory is limited in Matlab only by the amount of memory (including virtual memory) made available to it by the operating system. Matrices are stored in memory as contiguous space, so if you have a matrix that would occupy 8GB of memory, you would need one big chunk of 8GB to be available to you in memory.

    You can use the memory command to provide detailed statistics about the memory available to you, including the amount of contiguous memory available for a single matrix. For example:

    > memory
    
    Maximum possible array:           677 MB (7.101e+008 bytes) *
    Memory available for all arrays: 1601 MB (1.679e+009 bytes) **
    Memory used by MATLAB:            446 MB (4.681e+008 bytes)
    Physical Memory (RAM):           3327 MB (3.489e+009 bytes)
    
      *  Limited by contiguous virtual address space available.
      ** Limited by virtual address space available.
    

    To calculate the array size that the Maximum possible array value corresponds to, you simply divide by the number of bytes required by each array elements. From the memory documentation:

    Maximum Possible Array

    Maximum Possible Array is the size of the largest contiguous free memory block. As such, it is an upper bound on the largest single array MATLAB can create at this time.

    MATLAB derives this number from the smaller of the following two values:

    * The largest contiguous memory block found in the MATLAB virtual address space
    * The total available system memory
    

    To see how many array elements this number represents, divide by the number of bytes in the array class. For example, for a double array, divide by 8. The actual number of elements MATLAB can create is always fewer than this number.

    Mathworks also provides detailed documentation on how to avoid Out of Memory errors here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Finding 99% coverage in Matlab How can I compute P10, P50 and
Possible Duplicate: Octave/MATLAB: How to compare structs for equality? is there a simple comparison
Possible Duplicate: Bayesian networks in MATLAB Is there a toolbox in Matlab which implement
Possible Duplicate: In MATLAB, can I have a script and a function definition in
My question is a possible duplicate of this: matlab mex files and C++ dll
Possible Duplicate: Changing scaling of MATLAB Figure I have an m-size vector f. By
Possible Duplicate: How can I index a MATLAB array returned by a function without
Possible Duplicate: How can I generate a list of function dependencies in MATLAB? I
Possible Duplicate: MATLAB: How to vector-multiply two arrays of matrices? Is there a way
Possible Duplicate: MATLAB indexing question How to extract non-vertical column from matrix in Matlab

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.