LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot constanly updated 2x4 array

I have a constantly updated 2x4 array attached in this thread. Is there a way to plot both four points in XY graph simultaneously?I just have the last piece to finish, which is how to plot the path points at the same time. The first row 4,3,2,1 is the x axis coordinates, and the second row is the y axis coordinates.

 

 

The physical background is that the four points represent the previous locations of a moving object. Therefore, the code is actually trying to simulate the trajectory of the object.

 

 

0 Kudos
Message 1 of 9
(3,349 Views)

Maybe like this? (there are many similar ways to do this)

 

 

 

Make sure to turn off autoscaling on the axes.

0 Kudos
Message 2 of 9
(3,340 Views)

Sorry to ask but what's the name of first operation before you took the real and imaginary part of the martix element?

0 Kudos
Message 3 of 9
(3,328 Views)

"index array"

 

(If you leave one index unwired, you get an entire row or column. We want rows 0 and 1, thus no need to wire the indices)

0 Kudos
Message 4 of 9
(3,323 Views)

Oh, the outlook of the index array changes once I plug in the array. My bad.

0 Kudos
Message 5 of 9
(3,316 Views)

Yes, it adapts to the number of dimensions. For a 2D array, one index is not enough. 😄

0 Kudos
Message 6 of 9
(3,313 Views)

I have another question. Is there way to combine a circle which outputs as a cluster and the plot your just showed upstairs into a single XY Graph. My problem is that these are two different data types(one is cluster and another is array) and I don't know how to convert one into another.

 

Here is my code for 2D circle.

0 Kudos
Message 7 of 9
(3,302 Views)

So, basically, the ball will bounce back from the edge of the wall when hitting it.

0 Kudos
Message 8 of 9
(3,294 Views)

If this is for an XY graph, you can replace the bundle with "RE/IM to complex".

 

If these are all the same plot, you can concatenate the various complex arrays. If you want three different plots, use "build cluster array" resized for three inputs before wiring to the graph.

0 Kudos
Message 9 of 9
(3,276 Views)