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.
variable(inx1,inx2,inx3,inx4)

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,
Regards
Jose

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

Contact us