472,331 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,331 software developers and data experts.

How can I extract a row of data from a 2 dimensional array

Seems a simple question, but I can't find a simple answer:

I have created a two dimensional array. I wish to send the data, a row at a time to a graph plotting routine which is expected a one dimension array.

I could create a temporary one dimensional array and populate from the original array and then pass it to the routine, but this would seem to be long winded (read slow), and may well give me problems, as the previous values in the temporary table are overwritten.

Is there a simple way to create a one dimensional array from a single row of a two dimensional array?

Many Thanks

Smurf
Jul 21 '05 #1
1 2463
Hey Smurf,

I'm not too sure there is a simpler way to go from two-dimensional to one
than what you mentioned. Is there any possibility of using a jagged array
instead of a 2-dim? You could then pass just that element.

You _MIGHT_ find it quicker to create a 2-dim that only has one row then use
the Array.Copy() or the CopyTo() methods to duplicate the desired section,
though it's not really a 1-dim now so may not work either.

Good luck,

John

"smurf" <sm***@discussions.microsoft.com> wrote in message
news:7F**********************************@microsof t.com...
Seems a simple question, but I can't find a simple answer:

I have created a two dimensional array. I wish to send the data, a row at a time to a graph plotting routine which is expected a one dimension array.
I could create a temporary one dimensional array and populate from the original array and then pass it to the routine, but this would seem to be
long winded (read slow), and may well give me problems, as the previous
values in the temporary table are overwritten.
Is there a simple way to create a one dimensional array from a single row of a two dimensional array?
Many Thanks

Smurf

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ruben | last post by:
I'm trying to pass an array of string to a function without knowing how many strings I have beforehand. I've defined one functions as char *...
16
by: rguti | last post by:
Hi, How do I create a two dimensional array? I have created a one dimensional doing this: Dim laFields As ArrayList = New ArrayList How...
1
by: smurf | last post by:
Seems a simple question, but I can't find a simple answer: I have created a two dimensional array. I wish to send the data, a row at a time to a...
5
by: Diffident | last post by:
Hello All, I have a 2-dimensional array that I am storing as a session variable. I have no idea on how I can cast the session variable back to...
2
by: | last post by:
While I can extract the option value from the following: <Select name='Keystring' MULTIPLE> <option value='1' name='status'>Pending</option>...
3
by: vvenk | last post by:
Hello: Is is possible to declare a 2-dimensional array, the first dimension being an Integer and the 2nd dimension another data type, say string?...
6
by: fniles | last post by:
I need to store information in a 2 dimensional array. I understand ArrayList only works for a single dimensional array, is that correct ? So, I use...
272
by: Peter Olcott | last post by:
http://groups.google.com/group/comp.lang.c++/msg/a9092f0f6c9bf13a I think that the operator() member function does not work correctly, does...
5
by: =?Utf-8?B?aWxy?= | last post by:
Hi This is probably fairly simple but I am newish at programming and was wondering if someone can give me some advice on handling the following....
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.