From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-04-2014 06:55 AM
Hello,
i have three arrays A (integer), B (timestamp) and C (double).
Now i want to convert them into a cluster array. The size of the cluster-array is the number of different values in array A (here: two different values 1 and 2)
So index 0 of the cluster array contains integer 1 and two arrays with all values of the other two arrays where the index of array A is 1.
Index 1 of the cluster array contains integer 2 and two arrays with all values of the other two arrays where the index of array A is 2.
How can this be done?
Thanks and best regards
Solved! Go to Solution.
08-04-2014 07:12 AM - edited 08-04-2014 07:13 AM
Something like this?
08-04-2014 07:17 AM - edited 08-04-2014 07:22 AM
edit 🙂
08-04-2014 07:19 AM - edited 08-04-2014 07:22 AM
No, the array-size of the output array equals the size of different numbers in array A.
In your screenshot the values of B and C in index 2 should appear as array under index 0 as they have the same number in A.
A:
1
2
1
2
B
2009
2010
2011
2012
C
10
11
12
13
Cluster[0]
1
Timestamp[2009,2011]
Value[10,12]
Cluster[1]
2
Timestamp[2010,2012]
Value[11,13]
The values in A are not always in a order. They can be mixed like [1,2,1,2,1,1,1,1,2,2,1,2,1,2,2,2,2,1,1,1]
08-04-2014 07:23 AM
How about this one:
Regards, Jens
08-04-2014 07:27 AM
08-04-2014 08:00 AM
Hi jcarmody,
where did you get this library? I just downloaded my version from http://lavag.org/files/file/169-openg-array-xnodes/ but i have different in/outputs of the vis...
Thx
08-04-2014 08:03 AM
here my (not so flexible) solution using conditional indexing ...
I canceled my first try , so I thought I should provide at least another solution 😉
08-04-2014 08:05 AM
Install the OpenG Package with the help of the VI Package Manager.
Regards, Jens
08-04-2014 08:07 AM