Thread Subject: What is the largest character array that MATLAB can hold?

Subject: What is the largest character array that MATLAB can hold?

From: Thiago

Date: 7 Feb, 2009 18:46:02

Message: 1 of 4

What is the largest character array (i.e. string) that MATLAB can hold? Or, is it just a matter of computer memory?

Thanks!

Subject: What is the largest character array that MATLAB can hold?

From: Jos

Date: 7 Feb, 2009 19:22:02

Message: 2 of 4

"Thiago " <thiago@mathworks.com> wrote in message <gmkkta$r6u$1@fred.mathworks.com>...
> What is the largest character array (i.e. string) that MATLAB can hold? Or, is it just a matter of computer memory?
>
> Thanks!

You may have to wait for a while ....

% Don't try this at home ...
c = '' ;
try
  while(1)
     c = [c 'x'] ; % increase the string
    pause(0.001) ; % allow for Ctrl-C
  end
catch
  disp(length(c)) ;
end



Jos

Subject: What is the largest character array that MATLAB can hold?

From: ImageAnalyst

Date: 7 Feb, 2009 22:50:12

Message: 3 of 4

Thiago
Type memory at the command line and see what it says is the largest
array in terms of megabytes.

Subject: What is the largest character array that MATLAB can hold?

From: Steven Lord

Date: 10 Feb, 2009 20:25:43

Message: 4 of 4


"Thiago " <thiago@mathworks.com> wrote in message
news:gmkkta$r6u$1@fred.mathworks.com...
> What is the largest character array (i.e. string) that MATLAB can hold?
> Or, is it just a matter of computer memory?

Theoretically, look at the second output of the COMPUTER function.

Practically, yes, in most circumstances the limit is a matter of how large a
contiguous block of memory you have available for storing the string.

--
Steve Lord
slord@mathworks.com

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com