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: c.
Subject: Re: cell{1:5}=1 not working for me!!!
Date: Wed, 30 May 2012 17:07:16 +0200

On 30 May 2012, at 16:45, oxy wrote:

> Hi, look at it:
> 
> octave:1> cell{1:5}=1
> error: invalid assignment to cs-list outside multiple assignment.
> error: assignment to cell array failed
> error: assignment failed, or no method for `<unknown type> = scalar'
> 
> It used to work in past versions. This code is from an old functioning
> script from me. What happened?

the correct syntax is 

cell = cell(1, 5);
cell(1:5) = 1;

if your syntax used to work with a previous version of Octave that version had 
a bug.

c.

reply via email to

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