Error message abt memory

John W. Eaton jwe at bevo.che.wisc.edu
Wed Jun 11 21:56:30 CDT 2008


On 11-Jun-2008, Jordi Gutiérrez Hermoso wrote:

| into an equivalent while loop. As I understand it, for 1 = 1:55*10^6
| actually creates a vector of that size.

No, ranges in Octave are stored as start, end, and increment:

  octave:1> x = 1:55*10^6;
  octave:2> whos x

  *** local user variables:

    Prot Name        Size                     Bytes  Class
    ==== ====        ====                     =====  ===== 
     rwd x           1x55000000                  24  double

  Total is 55000000 elements using 24 bytes

However, many operations on them will turn them into vectors.

jwe



More information about the Help-octave mailing list