[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with reading lists
From: |
John W. Eaton |
Subject: |
Problem with reading lists |
Date: |
Tue, 8 Mar 2005 21:34:49 -0500 |
On 8-Mar-2005, Marcus Vinicius Eiffle Duarte <address@hidden> wrote:
| I just discovered that textread returns lists, instead of cell arrays.
| I didn't find some kind of list2cell function. Is there any built-in
| or m-function to convert one to another.
| I tried the code
|
| function cellvar = list2cell( listvar )
| elements = length( listvar );
| cellvar = cell( elements, 1 );
| for aux = 1 : size( listvar, 1 )
| cellvar{ aux } = listvar( aux );
| end
|
| However, when I try
| x = list(1,2,3,4);
| xx = list2cell(x);
|
| Octave gives an error and closes.
This is a bug, but I think it is fixed in the current
testing/recommended version of Octave, 2.1.67.
jwe
-------------------------------------------------------------
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
-------------------------------------------------------------
- Problem with reading lists, Marcus Vinicius Eiffle Duarte, 2005/03/08
- Problem with reading lists,
John W. Eaton <=
- Problem with reading lists, John W. Eaton, 2005/03/08
- Re: Problem with reading lists, Quentin Spencer, 2005/03/09
- Re: Problem with reading lists, John W. Eaton, 2005/03/09
- Re: Problem with reading lists, Quentin Spencer, 2005/03/09
- deprecated builtin variables (was Re: Problem with reading lists), Quentin Spencer, 2005/03/09
- deprecated builtin variables (was Re: Problem with reading lists), John W. Eaton, 2005/03/09
- Re: deprecated builtin variables (was Re: Problem with reading lists), Paul Kienzle, 2005/03/09
- Re: deprecated builtin variables (was Re: Problem with reading lists), John W. Eaton, 2005/03/09