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

Contact us at files@mathworks.com