Dear Tim:

Yes, I am.

Thank you.

There is a lot to learn about Julia, but it is all worth it.

Best wishes,

Jim

On 07/31/2015 07:09 PM, Tim Holy wrote:
Are you looking for permutedims?

--Tim

On Friday, July 31, 2015 04:05:09 PM [email protected] wrote:
Hi All:

I have a 3-d array (Float64), call it q, with dimensions (d1, d2, d3)

that needs to be to changed to an array, call it Q, with dimensions (d2,
d3, d1) to perform several computations.

I have tried using the reshape command but that does not respect the first
dimension (row) of the q array becoming the third dimension of the array Q.

The only solution I have found is to define an array Q = Array(Float64, d2,
d3, d1).

Next, create

q1 = squeeze(q[1,:,:],1)

q2 = squeeze(q[2,:,:],1)

...

qd1 = squeeze(q[d1,:,:],1)

and then set

Q[1,:,:] = q1

Q[2,:,:] = q2

...

Q[d1,:,:] = qd1.

Although this "works," it seems neither elegant nor efficient code.  Also,
these computations are within a particle filter simulator in which d1 = 7,
but d2 = 180, and d3 >= 20,000.

Suggesting my solution will slow the simulations.

Your advice/suggestions are appreciated.

Thanks.

Jim Nason

Reply via email to