Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Deleting Specific Dimensions of a 3D Array

Is it possible to erase specific dimensions of an array while a routine is
running to increase the performance of the routine? Lets say I have a 3D
Array:

Redim 3DArray (0 to 10000, 0 to 300, 0 to 50)

Let say I populate with three For Next Loops:

For X = 1 to 50
For Y = 1 to 300
For Z = 1 to 10000
3DArray(Z,T,X) = Rnd()
Next
Next
'Lets say I want to delete the all the data associated with X = 1 when
'the loop progresses to X = 2, and continue to do this
Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Deleting Specific Dimensions of a 3D Array

For X = 1 to 50
For Y = 1 to 300
For Z = 1 to 10000
3DArray(Z,T,X) = Rnd()
if X 1 then _
3DArray(Z,T,X-1) = empty ' or 0
Next
Next
Next

--
Regards,
Tom Ogilvy


"ExcelMonkey" wrote in message
...
Is it possible to erase specific dimensions of an array while a routine is
running to increase the performance of the routine? Lets say I have a 3D
Array:

Redim 3DArray (0 to 10000, 0 to 300, 0 to 50)

Let say I populate with three For Next Loops:

For X = 1 to 50
For Y = 1 to 300
For Z = 1 to 10000
3DArray(Z,T,X) = Rnd()
Next
Next
'Lets say I want to delete the all the data associated with X = 1 when
'the loop progresses to X = 2, and continue to do this
Next



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Deleting Specific Dimensions of a 3D Array

Does deleting data from the 3rd dimension free up memory to speed up the
routine? Or would I have to redimension the array to see the affects on
performance?

"Tom Ogilvy" wrote:

For X = 1 to 50
For Y = 1 to 300
For Z = 1 to 10000
3DArray(Z,T,X) = Rnd()
if X 1 then _
3DArray(Z,T,X-1) = empty ' or 0
Next
Next
Next

--
Regards,
Tom Ogilvy


"ExcelMonkey" wrote in message
...
Is it possible to erase specific dimensions of an array while a routine is
running to increase the performance of the routine? Lets say I have a 3D
Array:

Redim 3DArray (0 to 10000, 0 to 300, 0 to 50)

Let say I populate with three For Next Loops:

For X = 1 to 50
For Y = 1 to 300
For Z = 1 to 10000
3DArray(Z,T,X) = Rnd()
Next
Next
'Lets say I want to delete the all the data associated with X = 1 when
'the loop progresses to X = 2, and continue to do this
Next




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort array with 2 dimensions? eclipse Excel Programming 4 October 27th 05 04:19 PM
Array function, two dimensions?? and worksheet arrays Neal Zimm Excel Programming 7 October 3rd 05 09:16 PM
Array function, two dimensions?? Neal Zimm Excel Programming 0 October 1st 05 04:14 PM
Checking existence of array dimensions kdw Excel Programming 2 November 9th 04 08:32 PM
Checking Number of Dimensions In Array DigableP Excel Programming 2 February 28th 04 11:18 PM


All times are GMT +1. The time now is 01:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"