help-octave
[Top][All Lists]
Advanced

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

Re: trouble indexing cell array


From: Ben Abbott
Subject: Re: trouble indexing cell array
Date: Sun, 04 Nov 2012 19:09:32 -0500

On Nov 4, 2012, at 7:04 PM, Tim Meehan wrote:

> I'm having a strange problem shown below. I want to take a subset of a cell 
> array and save it as a new variable. I can index the subset just fine, but 
> when I try to save the subset into a new variable, it saves as only one 
> element in the array. I'm mystified, can anyone tell me what I'm doing wrong?
> 
> octave:326> filenames{2:10}
> ans = _L_V1d.mat
> ans = _L_V1v_vox.mat
> ans = _L_V2d.mat
> ans = _L_V2v_vox.mat
> ans = _L_V3.mat
> ans = _L_V3A_dors.mat
> ans = _L_V3A_vox.mat
> ans = _L_V4_vox.mat
> ans = _L_VP_vox.mat
> octave:327> test = filenames{2:10}
> test = _L_V1d.mat

Add a set of curly brackets around the cs-list

        test = {filenames{2:10}}

Ben



reply via email to

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