04-29-2009 08:05 AM
Hi samatha.k,
what's the problem with it? You get only one point, because you write everytime to the same position. If you need a "curve" then you should connect the i terminal to y.
Hope it helps.
Mike
04-29-2009 09:06 AM - edited 04-29-2009 09:07 AM
What you have done is take your x-axis and y-axis variables, and make them act as constants. Then you feed them into a for loop that says for i=0..99 create an element out of x-axis and y-axis (constants). So for example, if you set x-axis = 4 and y-axis = 8, you will create two arrays; each with 100 elements, one where every element = 4, and the other where every element = 8. If you plot (4,8) on graph paper 100 times, you will have single point (probably pretty smudgy) at (4,8). The way I used to graph things, I would create a table with an x and a y (or f(x)) where x would vary from -10 to 10 (or whatever), and y was a function of x, let's say y=x^2. To graph that in labview, take advantage of the i terminal in the for loop. i will increment by 1 for every iteration. if you want x to start from -10, then use i-10 and make the for loop iterate 21 times {-10, -9, .. , 0, 1, 2, .. , 10}. Inside the for loop, square each value of i-10. Think of this as a substitution where x = i-10, and y = (i-10)^2. It looks like this:
Chris
05-01-2009 10:44 AM
05-01-2009 10:45 AM