02-06-2012 09:15 AM
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
Solved! Go to Solution.
02-06-2012 09:52 AM
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
02-06-2012 10:27 AM
You can use the array subset function.
02-06-2012 12:58 PM
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
02-06-2012 02:02 PM
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
02-06-2012 02:13 PM
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
02-06-2012 02:27 PM
Obtain a subset of the array and delete the pages that you dont need.
02-08-2012 09:05 AM
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
02-09-2012 07:16 PM
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.