05-30-2006 05:27 AM
06-05-2006 03:56 AM
Hi,
As the plot functions only accept 1D arrays as parameters you will have to
convert your 2D array to two 1D arrays. Unfortunately there doesn't seem to be
a native VB.net function to access just one dimension of an array (or I can't
find it). The only alternatives would be to copy the array element by element
into two new arrays which you mentioned wasn't an option due to the possible
size or copy the memory locations to a new array. Rectangular (each dimension
has the same length) multidimensional arrays are stored in one contiguous
block of memory with dimensions stored one after the other. Because of this you
could directly copy a memory range that would be the first dimension in the
array and then repeat for the other dimension. Bellow is a link to an example
that converts a 2D array to a 1D array, you could use these principles to
perform the functions you need.
http://www.freevbcode.com/ShowCode.asp?ID=3977
Regards
Jon B
Applications Engineer
NIUK