LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Indexing an array

I have an array where there are 100,000 index points. I want to graph 30,000 index points with the array starting at index 70,000, but I don't know how to initialize the array to start from index 70,000?

 

Please advise.

 

Thank you.

0 Kudos
Message 1 of 14
(4,100 Views)

Take a subset of the array and graph that, instead.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 14
(4,094 Views)

Since you already have the array, there is nothing to initialize.

You can use "array subset" to get part of the array (and set x0 of the x-axis to 70k) or you could just graph the entire array while setting the xmin, xmax to the "interesting" range.

0 Kudos
Message 3 of 14
(4,091 Views)

Sorry I have two subarrays which I have made to go to an index length of 30K.

So I want to plot from 70k-100k and I don't know how to make the arrays start from 70k and go towards 100k for the 30k index length?

 

 

0 Kudos
Message 4 of 14
(4,075 Views)

I have two 1D subarrays which I have made to go to an index length of 30K.

So I want to plot from 70k-100k and I don't know how to make the arrays start from 70k and go towards 100k for the 30k index length?

Instead what happens is that I just get the first 30k indexes going from 0-30k.

 

 

0 Kudos
Message 5 of 14
(4,070 Views)

@IRG wrote:

Sorry I have two subarrays which I have made to go to an index length of 30K.

So I want to plot from 70k-100k and I don't know how to make the arrays start from 70k and go towards 100k for the 30k index length?


Your description makes absolutely no sense. Please attach a small VI to show that you have and what you want.

 

  • What is a subarray? That is not a native datatype.
  • What is the meaning of "going to an index"?
  • Arrays always start at index zero, but you can of course manipulate the index calculation for a custom mapping.
  • Are you looking for a data manpulation or just cosmetics (plot). For the plot, I already told you how to change the x-scale.
0 Kudos
Message 6 of 14
(4,068 Views)

Well, you didn't attach your "sub-arrays", and I don't understand what you mean by "made to go to an index length of 30K" and "want to plot from 70k-100k".  Are you saying that you want to plot your 30k plots so that, on the plot, the first point is labeled "70k" and the last point is at "100k"?  If this is so, have you looked at the Plot Properties?  Do you know what all the Properties mean?  [If not, do you know how to use the LabVIEW "Help" option to "explain it all to you"?].

 

Bob Schor

0 Kudos
Message 7 of 14
(4,067 Views)

Please don't create duplicate posts.  People are already trying to help you in your other post.

0 Kudos
Message 8 of 14
(4,059 Views)

I meant array subsets with a set index length which I imposed.

 

I guess the big question for me that you listed is the index manipulation.

 

Like I said I have two 1D array subsets which I would like to manipulate the index.

0 Kudos
Message 9 of 14
(4,040 Views)

@IRG wrote:

I meant array subsets with a set index length which I imposed.

 

I guess the big question for me that you listed is the index manipulation.

 

Like I said I have two 1D array subsets which I would like to manipulate the index.


Still makes no sense. You cannot "manipulate" the index of an array, only the data of an array. You can have arbitrary ramps that map into the index of the array, but this has nothing to do with the array itself. The index is always a I32 integer, zero for the first element and incrementing by exactly one for each additional element.

 

Again, we cannot help unless you attach some code showing exactly what you have and what you want to get out of it. Until then, you are on your own. Sorry.

0 Kudos
Message 10 of 14
(4,026 Views)