[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cell{1:5}=1 not working for me!!!
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: cell{1:5}=1 not working for me!!! |
Date: |
Wed, 30 May 2012 11:52:34 -0400 |
On 30 May 2012 11:36, oxy <address@hidden> wrote:
> And why a cell cannot be initialized as global?
>
> octave:12> global p
> octave:13> p(1:5)={3}
> error: operator =: no conversion for assignment of `cell' to indexed `matrix'
> error: assignment failed, or no method for `matrix = cell'
You haven't initialised p to be anything yet. When you do `p(1:5)', by
default `p(1:5)' is a matrix, not a cell array. Matrices can't contain
cells such as {3}
Instead do `p = {}' before you do `p(1:5) = 3'.
HTH,
- Jordi G. H.
- Re: cell{1:5}=1 not working for me!!!, (continued)
- Re: cell{1:5}=1 not working for me!!!, Juan Pablo Carbajal, 2012/05/30
- Re: cell{1:5}=1 not working for me!!!, Francesco Potortì, 2012/05/31
- Re: cell{1:5}=1 not working for me!!!, Jordi Gutiérrez Hermoso, 2012/05/31
- Re: cell{1:5}=1 not working for me!!!, oxy, 2012/05/31
- Re: cell{1:5}=1 not working for me!!!, Jordi Gutiérrez Hermoso, 2012/05/31
- Re: cell{1:5}=1 not working for me!!!, oxy, 2012/05/31
- Re: cell{1:5}=1 not working for me!!!, Jordi Gutiérrez Hermoso, 2012/05/31
Re: cell{1:5}=1 not working for me!!!, c., 2012/05/30