help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: about the cell () function


From: David Bateman
Subject: Re: about the cell () function
Date: Tue, 31 Aug 2004 15:03:27 +0200
User-agent: Mutt/1.4.1i

What version of octave are you using. It seems to be prior to 2.1.51
as the cell object is based on Array2... However, even with a 2.1.50
version of octave I can't generate this error. That is 

octave:1> a = cell(2,2)
a =
{
  [1,1] = [](0x0)
  [2,1] = [](0x0)
  [1,2] = [](0x0)
  [2,2] = [](0x0)
}
octave:2> a(1,1) = 4
a =
{
  [1,1] = 4
  [2,1] = [](0x0)
  [1,2] = [](0x0)
  [2,2] = [](0x0)
}
octave:3> version
ans = 2.1.50

D.



According to Jose de Zarate <address@hidden> (on 09/01/04):
> hi, this a silly question about the cell function. what is it for??
> it seemed to me like a matrix container. I can define a nxm cell
> container with cell (n,m), and I can also assign it to a variable (name
> it 'pepe'), but I just can't find the way of assigning values of
> particular cells of my cell variable. I try pepe(1,1)=4 (or whatever),
> but i get this error:
> error: range error
> error: T& Array2<t>:: checkelem(0,-1): range error
> error: evaluating assignment expresion near (blah, blah).
> 
> So this is somehow crazy, I can define an empty nxm container, but I can
> do nothing with it????
> 
> 
> 
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
> 
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------

-- 
David Bateman                                address@hidden
Motorola CRM                                 +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 1 69 35 77 01 (Fax) 
91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]