Jump to content

Organising an array


Recommended Posts

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.

Link to comment

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!

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.