help-octave
[Top][All Lists]
Advanced

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

Re: cell{1:5}=1 not working for me!!!


From: oxy
Subject: Re: cell{1:5}=1 not working for me!!!
Date: Thu, 31 May 2012 15:28:24 +0200

... trying to generate a global cell. First try: cell(1:5)={3}

>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'.


This is a very important point to be a hidden trick.
I suggest writing it on the documentation since using
global cells must be common place.

Thx..


reply via email to

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