Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to access an array inside array.

Subject: How to access an array inside array.

From: Roy

Date: 12 Mar, 2013 12:44:07

Message: 1 of 5

Hello

My question is I have an array of <4516x1> . This array consists of nested arrays as <13x1><12x1>.....<14x1> , for example lets take the first array <13x1> . If I access this it will lead to another set of arrays <1x1><1x1>...<1x1> and when accessing this, it contains some measured data.

I can actually access this via the workspace window. But how do I access this via the command window.

your answers are highly appreciated.

Subject: How to access an array inside array.

From: thomas.ibbotson@mathworks.co.uk

Date: 12 Mar, 2013 12:55:46

Message: 2 of 5

Roy <theredhat@yahoo.com> wrote:
> Hello
>
> My question is I have an array of <4516x1> . This array consists of nested arrays as <13x1><12x1>.....<14x1> , for example lets take the first array <13x1> . If I access this it will lead to another set of arrays <1x1><1x1>...<1x1> and when accessing this, it contains some measured data.
>
> I can actually access this via the workspace window. But how do I access this via the command window.
>
> your answers are highly appreciated.

I'm going to guess that you are talking about cell arrays, as these can
be nested in the way you describe, but normal MATLAB arrays cannot. So I
think the documentation page you want is:

http://www.mathworks.com/help/matlab/matlab_prog/access-data-in-a-cell-array.html

but it might also be useful for you to read more of the language
fundamentals section of the documentation too.

HTH,
Tom

Subject: How to access an array inside array.

From: Roy

Date: 12 Mar, 2013 13:03:06

Message: 3 of 5

"Roy" wrote in message <khn7un$d0s$1@newscl01ah.mathworks.com>...
> Hello
>
> My question is I have an array of <4516x1> . This array consists of nested arrays as <13x1><12x1>.....<14x1> , for example lets take the first array <13x1> . If I access this it will lead to another set of arrays <1x1><1x1>...<1x1> and when accessing this, it contains some measured data.
>
> I can actually access this via the workspace window. But how do I access this via the command window.
>
> your answers are highly appreciated.

Thank you . I will do it !!

Subject: How to access an array inside array.

From: Roy

Date: 12 Mar, 2013 13:06:07

Message: 4 of 5

thomas.ibbotson@mathworks.co.uk wrote in message <khn8ki$ee7$1@newscl01ah.mathworks.com>...
> Roy <theredhat@yahoo.com> wrote:
> > Hello
> >
> > My question is I have an array of <4516x1> . This array consists of nested arrays as <13x1><12x1>.....<14x1> , for example lets take the first array <13x1> . If I access this it will lead to another set of arrays <1x1><1x1>...<1x1> and when accessing this, it contains some measured data.
> >
> > I can actually access this via the workspace window. But how do I access this via the command window.
> >
> > your answers are highly appreciated.
>
> I'm going to guess that you are talking about cell arrays, as these can
> be nested in the way you describe, but normal MATLAB arrays cannot. So I
> think the documentation page you want is:
>
> http://www.mathworks.com/help/matlab/matlab_prog/access-data-in-a-cell-array.html
>
> but it might also be useful for you to read more of the language
> fundamentals section of the documentation too.
>
> HTH,
> Tom

Thank you tom ! I was actually talking about cell arrays in specific nested cell arrays since these are nested to one another . I wanted to access it via the command window , as from work space it gets displayed in the variable editor window.

Subject: How to access an array inside array.

From: Roy

Date: 12 Mar, 2013 14:36:19

Message: 5 of 5

"Roy" wrote in message <khn97v$hep$1@newscl01ah.mathworks.com>...
> thomas.ibbotson@mathworks.co.uk wrote in message <khn8ki$ee7$1@newscl01ah.mathworks.com>...
> > Roy <theredhat@yahoo.com> wrote:
> > > Hello
> > >
> > > My question is I have an array of <4516x1> . This array consists of nested arrays as <13x1><12x1>.....<14x1> , for example lets take the first array <13x1> . If I access this it will lead to another set of arrays <1x1><1x1>...<1x1> and when accessing this, it contains some measured data.
> > >
> > > I can actually access this via the workspace window. But how do I access this via the command window.
> > >
> > > your answers are highly appreciated.
> >
> > I'm going to guess that you are talking about cell arrays, as these can
> > be nested in the way you describe, but normal MATLAB arrays cannot. So I
> > think the documentation page you want is:
> >
> > http://www.mathworks.com/help/matlab/matlab_prog/access-data-in-a-cell-array.html
> >
> > but it might also be useful for you to read more of the language
> > fundamentals section of the documentation too.
> >
> > HTH,
> > Tom
>
> Thank you tom ! I was actually talking about cell arrays in specific nested cell arrays since these are nested to one another . I wanted to access it via the command window , as from work space it gets displayed in the variable editor window.

Hello Tom !

http://www.mathworks.de/de/help/matlab/matlab_prog/multilevel-indexing-to-access-parts-of-cells.html

This is the document where the answer lies to my quesiton. I appreciate your help !

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us