jnew8916 Posted January 20, 2010 Report Share Posted January 20, 2010 I currently have an output array which is the product of 3 input channels (lets call them a, b and c.) The output array produces the data so that it is in the order a1 b1 c1 a2 b2 c2......an bn cn. I need to organise this data so that it is split into three arrays, one for each channel, with the data in chronological order, i.e. a1 a2 .....an. I also need the process to be dynamic enough that it can cope with the number of channels changing each time the program is run. I am sure there must be an easy enough solution to this problem I am just not experienced enough to know what it is. Any help would be great. Quote Link to comment
SAS Posted January 21, 2010 Report Share Posted January 21, 2010 Adding output arrays dynamically is not possible [to my knowledge] - so either go for 2D array [ if uniform data size] or, 1D array of cluster where each cluster contains an array as the output data format. A simple logic can parse the data into any of these output format. Hope this helps! Quote Link to comment
Black Pearl Posted January 21, 2010 Report Share Posted January 21, 2010 If you have a fixed number of channels, you could use the decimate array function. For dynamic size of channels, you would need to use a 2D array (clusters are also static). If you have 1D data, you could try with the reshape array function if you get a 2D array with the right order. Otherwise you will need to do it by coding on your own... (for-loop or nested for-loops) Felix Quote Link to comment
candidus Posted January 21, 2010 Report Share Posted January 21, 2010 I thought about a solution using "Reshape Array": Here is an example: ReshapeArray.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.