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:
multi-level indexing question

Subject: multi-level indexing question

From: Kirk

Date: 20 Jul, 2011 17:16:11

Message: 1 of 2

I am getting the an error upon trying to access data from the second level of a struct of structs (I'm trying to access all structs in the struct "climIn_mp_49x":

climIn_mp_49x(1,:).tmax(1:12,1);

??? Scalar index required for this type of multi-level indexing.

If I index only the first struct (1,1) of climIn_mp_49x, I get the correct data out of its the filed "tmax"

climIn_mp_49x(1,1).tmax(1:12,1);

Any way to access the field "tmax" from all stucts of climIn_mp_49x? Thanks in advance.

Subject: multi-level indexing question

From: Steven_Lord

Date: 20 Jul, 2011 19:04:20

Message: 2 of 2



"Kirk" <kwythers.nospam@umn.edu> wrote in message
news:j072gq$175$1@newscl01ah.mathworks.com...
> I am getting the an error upon trying to access data from the second level
> of a struct of structs (I'm trying to access all structs in the struct
> "climIn_mp_49x":

Please don't start multiple threads for the same question.

http://www.mathworks.com/matlabcentral/newsreader/view_thread/310662
http://www.mathworks.com/matlabcentral/newsreader/view_thread/310663

Since Matt J responded to you in 310663, I recommend continuing this
discussion (if his answer doesn't solve the problem) in that thread. Thanks.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

No tags are associated with 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