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:
Access data within a 4 dimension variable

Subject: Access data within a 4 dimension variable

From: Jose Miguel

Date: 14 Jun, 2012 07:21:07

Message: 1 of 1

Dear all,

I have some 4 dimension variables whose data can be accessed via indexing.

What I need to do is to access data in the following way:

a1 = variable (:, :, inx2(1), inx3(1))
a2 = variable (:, :, inx2(2), inx3(2))
a3 = variable (:, :, inx2(3), inx3(3))
a4 = variable (:, :, inx2(4), inx3(3))

Is there any way to do this without a loop? Obtaining a1, a2, a3 and a4 with just one instruction?

Thank you very much to all,

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