LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

decimate array

Hello:

My name is Juan Crespo, and I write you from Spain. I have a problem with a Labview application I am developing. I hope you could help me.

In my application, I read an interleaved array from a text file, the number of single arrays that are interleaved is variable, but user must put this number in a numerical control. I wanted the application to decimate the interleaved input array into arrays and then show a graph displaying all the arrays.

My problem is as follows: I have a LV block that I thought useful to my application ("Decimate 1D array"). But this block dont allow to set from a control the number os arrays in which the interleaved one must be divided. Dont you know any way in order to divide an interleaved array in a set of arrays, where the number of elements of this set must be provided from a control?

Well, I thank you very much for your attention... and, please, sorry for my bad english.

Yours Sincerely



Juan Crespo
0 Kudos
Message 1 of 4
(2,867 Views)
Hello Juan. How are things in Spain? You can set the number of output arrays by resizing the decimate function. See the attached vi. You have to do this at development time. You cannot do this using a control for the number of arrays and have the function resize at runtime. Maybe you could use a case structure and connect the control to the case. In each case you could have a decimate function that is properly sized. See attached vi, lower section. Hope this helps.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 4
(2,860 Views)
If you use a function set up as the image shows, you can reshape the 1-D array into a 2-D array and index it to pull out each individual decimated array. If you want something more specific, post some example data to feed in.
Randall Pursley
Message 3 of 4
(2,854 Views)
Hello:

Thank you very much for your help. I think that probably Randall option is more adequate to my needs, but I also found very useful the use of structures in tbob case. As you can easily realize, I am starting to use LV -I used LabWindows for two years, but I think that LV is going to reduce my development times- and all kind of help I am getting is good for me.

Well, thank you for your help, and I hope I could be helpful to you in any time. I suposse I am not a good help to you in LV problemes, but I think I could be useful in solving neural network and machine vision questions. If I could be helpful to you, please dont hesitate in email me to jlcrespo@rocketmail.com.

Yours Sincerely


Juan Crespo
0 Kudos
Message 4 of 4
(2,834 Views)