how to make Y((i,j),k) from X(i,j,k) ???

P

poyraz.kayabas

Hi All,

I have a 3-dimensional data set

It is a N x N x N matrix

In other words cells are X(i,j,k) for i,j,k =N

--------------
Here is my problem:

I want to create a table to represent this data. Since it is 3-dim, I
need a 2-dim matrix.
-------------

Question:

I want to make a matrix/ table for each (i,j) pair versus k

So it is going to be a 2-dim N*N x N matrix.

-----------------------------------------------
EXAMPLE: for N=2

I have this
i j k
X(1,1,1)=a
X(1,1,2)=b
X(1,2,1)=c
X(1,2,2)=d
X(2,1,1)=e
X(2,1,2)=f
X(2,2,1)=g
X(2,2,2)=k

But I need this

(i,j) k
Y((1,1),1)=a
Y((1,1),2)=b
Y((1,2),1)=c
Y((1,2),2)=d
Y((2,1),1)=e
Y((2,1),2)=f
Y((2,2),1)=g
Y((2,2),2)=k

Actually I need this

k= 1 2
(i,j)
(1,1) a b
(1,2) c d
(2,1) e f
(2,2) g k

And I have no idea about how to do this. And my N is 65 :-(

Thanks in advance.
 
S

starffly

a 3-dimension array may fulfill that using the k as the first
dimension.
or
create a struct type like this
struct 3d{
ElemType ij[N][N]
} k[N]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top