LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to plot particular set of data from 2d array

Solved!
Go to solution

Hi there,

 

I have a case in which I got a 2D data array with index(1-20) which makes it 3D, now I have to plot only particular set of data like from index 1,5 and exclude 3rd one, or plot data from index 1-10. Is it a way in labview so that I can choose the particular set and plot it on the graph.

Please let me know,

 

Thanks,

 

Ankit

0 Kudos
Message 1 of 9
(2,921 Views)

Ankit,

 

I do not understand your question.  A 2D array will have two index values (row and column). A 3D array has three index values (row, column, and page).

 

To get a portion of an array you can use Index Array or Array Subset, depending on what portion of the data you want.

 

Please post an example showing your data array (with values saved as default) an an example of what portion you want to choose and plot.

 

Lynn

 

0 Kudos
Message 2 of 9
(2,917 Views)

You can use the array subset function.

Tim
GHSP
0 Kudos
Message 3 of 9
(2,911 Views)

Hi Lynn,

 

Attached is the vi displaying 3d and 2d data, 3d data is just 2d data saved in an array on different pages ( here there are 20 pages). Each page of 3d data is the set of 1024 points. What I want is the method to display specific user define pages and plot it on the graph, like if I want to plot only pages from 1-7 and exclude the data on 4th pages. Is there a method to display only particular set of data from array on a graph. let me know if you need more info on this,

 

 

Thanks,

 

Ankit

0 Kudos
Message 4 of 9
(2,900 Views)

Ankit,

 

What you want can be done, I think.

 

The data you posted does not match your description.

 

Your 3D array has 1024 pages, 3 rows, and 40 columns.  Just operate the index up and down buttons with the display expanded to see what is changing.

 


Your 2D array has column 19 of page 0 in row 0, column 19 of page 1 in row 1, column 19 of page 2 in row 2, ...

 

Please clarify what you want the the user to be able to do.

 

Lynn

0 Kudos
Message 5 of 9
(2,886 Views)

Hi Lynn,

 

sorry for that, it seems somethiing meesed up my data, what specifically I want for the user be able to do is to plot the data of the specific pages, if there are 1024 pages( n number of pages), he should be able to select the pages( which contain data) of his choice and plot it on the graph, like if user wants to plot from pages 20-100 only out of 1024 he should be able to select number of pages and plot it. And I also want to give user the flexibility of excluding the pages while plotting like if he wants to plot from 20-100 and dont want to include the 32nd pages in the plot. Is it possible to do that kind of thing.Let me know.

 

Thanks,

 

Ankit

0 Kudos
Message 6 of 9
(2,881 Views)
Solution
Accepted by topic author AnkitG

Obtain a subset of the array and delete the pages that you dont need.

Spoiler
subset.png

 


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 7 of 9
(2,874 Views)

Thanks for the solution it solves my problem, but is it possible to select multiple pages and exclude it from the 3D array, I tried using for loop but it is excluding the index not the element.

Thanks

 

Ankit

0 Kudos
Message 8 of 9
(2,854 Views)

You could change the length to delete out adjacent pages, or just add in another delete function. Check out the detailed help for the delete from array function. 

Applications Engineer
National Instruments
CLD Certified
0 Kudos
Message 9 of 9
(2,841 Views)