03-11-2013 07:01 PM
LabVIEW 12.0f3 Student Edition 32-bit
Windows 7 64-bit
I am trying to simultaneously write a 2D array to a spreadsheet file and plot the same array to an XY Graph. The data consist of pairs of random numbers, between 0 and 1, that I take to be coordinates. When these points are graphed, they are initially shown flattened against the horizontal axis. After some time (it varies depending on the number of points) these points miraculously orient themselves correctly. Does anyone know what I'm doing wrong? I have included my vi and a link to a video showing the problem.
Solved! Go to Solution.
03-11-2013 07:39 PM - edited 03-11-2013 07:42 PM
Your code in gnereal is incredibly convoluted, and whatever you are doing with the reshaping and subsetting seems totally wrong. (create an indicator on the cluster going to the graph to see the actual values. They are not right!)
Here's what I would do instead (or similar).
Hint: start with NaN so the invalid data does not show.
03-11-2013 07:52 PM
Thanks for the quick reply. I just started programming in LabVIEW, so it's not surprising that my code is terrible. Thanks for showing me the proper way.
03-13-2013 11:20 AM - edited 03-13-2013 11:20 AM
Also note that xy graph accept complex data (X=RE, Y=IM). Now you can use a 1D complex array and everything is even simpler. 😄