LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting 2 arrays

Sorry,i think i have confused

X is separate set of points(an array) and Y is separate set of points(Another array), actually from your previous suggestions i have got the output. but for my analysis i am trying to get a waveform similar like to X values (X values plotted with time).

 

Thanks

 

0 Kudos
Message 11 of 52
(1,210 Views)
To plot 2 arrays vs time (AND the time points are equally spaced and thus linearly related to the array index), just built them into a 2D array and use a waveform graph for display. You are already doing this with the "SinCos" graph, right?
 
To change the time scaling, adjust offset and multiplier for the x-axis with a property node..
0 Kudos
Message 12 of 52
(1,206 Views)
Thanks very much, I will try
0 Kudos
Message 13 of 52
(1,202 Views)

Hi

I used many options but i didnt got the correct result

Actually I have 2 separate array(columns), i need to plot against each other.

for example, i say 1st array as X values and 2nd array as Y, so i need to plot against X and Y

Thanks

 

0 Kudos
Message 14 of 52
(1,176 Views)
This thread keeps going back and forth between an XY Graph and a normal graph. You've gotten advice on how to use both and if the display is not correct, then you need to provide details on HOW it's not correct. You've already been told this. Post the code that you are now using or at the very least, some images of what you are seeing now and what you want to be able to see.

Message Edited by Dennis Knutson on 03-31-2008 07:34 PM
0 Kudos
Message 15 of 52
(1,173 Views)

Yeah its going in circle Knutson,sorry for that

I have attched the code.

In that u can see that I have named the two graphs as Torque and Theta, so the final plot is Torque against Theta( expected output waveform is similar to the torque signal)

Thanks

0 Kudos
Message 16 of 52
(1,167 Views)

Please ignore the previous mesage

Yeah its going in circle Knutson,sorry for that

I have attched the code.

In that u can see that I have named the two arrays as Torque and Theta, so the final plot is Torque against Theta( expected output waveform is similar to the torque signal)

Thanks


0 Kudos
Message 17 of 52
(1,164 Views)
If your phase is zero, then both signals are the same and you would see a straight line. At other phase settings, the graph is also correct based on the data you are passing to it. The way you have it wired, the x axis is torque. Verify that is what you want.
0 Kudos
Message 18 of 52
(1,163 Views)
Thanks Dennis
0 Kudos
Message 19 of 52
(1,159 Views)
Your code is still extremely convoluted and overly complicated. Have a look at the FOR loop in frame #2 of your useless stacked sequence structure.
 
As you can see from the picture you have 90% too much code! The array size, index array, feedback node and FOR loop can all be deleted without change in outcome. 😄 For some unknown reason, you initialize the feedback node as EXT, causing a coercion and extra data copies in memory for absolutely no benefit. The EXT array will be coerced again to DBL at the xy graph.
 
I left some notes on the picture. I recommend the code at the very bottom. 🙂
 
 
 


Message Edited by altenbach on 03-31-2008 10:43 PM
0 Kudos
Message 20 of 52
(1,134 Views)