05-14-2015 03:15 PM
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.
05-14-2015 03:23 PM - edited 05-14-2015 03:27 PM
Maybe like this? (there are many similar ways to do this)
Make sure to turn off autoscaling on the axes.
05-14-2015 03:32 PM
Sorry to ask but what's the name of first operation before you took the real and imaginary part of the martix element?
05-14-2015 03:33 PM - edited 05-14-2015 03:35 PM
"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)
05-14-2015 03:36 PM
Oh, the outlook of the index array changes once I plug in the array. My bad.
05-14-2015 03:37 PM
Yes, it adapts to the number of dimensions. For a 2D array, one index is not enough. 😄
05-14-2015 04:10 PM - edited 05-14-2015 04:11 PM
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.
05-14-2015 04:19 PM
So, basically, the ball will bounce back from the edge of the wall when hitting it.
05-14-2015 05:20 PM
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.