MKevin has asked for the wisdom of the Perl Monks concerning the following question:
I need an x that works at converting this correctly. Help me..... SLN: After playing around with it: x = i + (nx)*j + ((nx)*(ny))*kdo k = 0, nz - 1, 1 do j = 0, ny - 1, 1 do i = 1, nx, 1 x = i + (nx)*j + ((nx)*(ny+1))*k threeDarray(i,(j + 1),(k + 1))=oneDarray(x) enddo enddo enddo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 1d array into 3d
by GrandFather (Saint) on Mar 31, 2009 at 04:52 UTC | |
by BrowserUk (Patriarch) on Mar 31, 2009 at 05:00 UTC | |
|
Re: 1d array into 3d
by BrowserUk (Patriarch) on Mar 31, 2009 at 04:12 UTC | |
|
Re: 1d array into 3d
by ikegami (Patriarch) on Mar 31, 2009 at 03:00 UTC | |
|
Re: 1d array into 3d
by $self (Friar) on Mar 31, 2009 at 09:40 UTC | |
|
Re: 1d array into 3d
by juster (Friar) on Mar 31, 2009 at 04:59 UTC | |
|
Re: 1d array into 3d
by kyle (Abbot) on Mar 31, 2009 at 03:03 UTC | |
|
Re: 1d array into 3d
by Anonymous Monk on Oct 12, 2011 at 14:28 UTC |