Plotting Discrete Functions with LabVIEW

 

            Suppose you want to plot a discrete function given by the following table of data taken from the Time of Flight LabVIEW VI (CW 9) with h0=0.3m.

Then two one-dimensional ARRAYs can be used, place the Arrays then a Digital Control in each, to input the series of data for t (time of flight) and v0 (initial speed). And the XY GRAPH can be used to show the plot.

 

Recall computers can only deal with numbers (what we discussed in Plotting Continuous Functions with LabVIEW), since we are inputting numbers, not functions, no intermediate steps are needed here except to bundle the two series together and tell the XY Graph to plot it. The data to be plotted on the horizontal axis is to go in first, i.e., to be wired into the upper left terminal of bundle. The data to be plotted on the vertical axis will go next, i.e. they should be wired into the lower left terminal of bundle. For example, if you want to plot t against v0, then v0 goes first and then t. See figures below.