07-30-2015 02:34 PM
I have a 1D array of times t, and a 2d array where each column is a function f1(t), f2(t), f3(t), f4(t).
How do I generate the cluster needed as an input to the Graph Indicator from these two things to plot f1,f2,f3,f4 on the same graph? or ever have each on their own graph?
Solved! Go to Solution.
07-30-2015 02:36 PM
Hi math,
use an autoindexing FOR loop to index your Y 1D data from your 2D array. In the loop you build a cluster of X and Y 1D array, after the autoindexing output tunnel you will have an array of plots for your XY graph…
07-30-2015 02:46 PM
07-30-2015 02:49 PM
07-30-2015 03:34 PM
I managed to make it work by doing this:
That subVI just takes the 2d array and outputs a reshaped 1d array from the column vector given by the other input.
Final question, this thing will be part of a VI that runs once every iteration. Is there any way to "concatenate" the graphs of each iteration to show an overall graph?
07-30-2015 03:41 PM
Also, the reason for using that subVI instead of just autoindexing is that autoindexing a 2d spits out rows, when I wanted columns. An alternate solution would be to transpose the solutions array and just use autoindexing.
07-31-2015 01:14 AM
Hi math,
autoindexing a 2d spits out rows
Yes, that's the correct order of things in a 2D array …
When you have measurement data, e.g. from DAQmxRead, you get your data row-wise!
An alternate solution would be to transpose the solutions array and just use autoindexing.
Yes, that's the (most probably) more efficient solution…