02-22-2014 08:34 AM
I want to use negative iteraion values for 'for' loop...u seem to suggest as indexing is a way to go for....can u pls attach some example or further explain how to go about it.
P.S.:I am new to labview.
02-22-2014 08:37 AM
I want to use negative iteraion values for 'for' loop...u seem to suggest using user created loop counter is a way to go for....can u pls attach some example or further explain how to go about it.
P.S.:I am new to labview.
02-22-2014 08:40 AM
I do not understand what you mean by "negative iteration". Like I said before, provide an example of exactly what you want. If you have code that does what you want already (even if it is a Rube Goldberg), then please share that as well.
02-22-2014 08:54 AM
I am basically trying to do basic operations of scaling,shifting and reflection on unit step function using elementary elements(no pre-defined blocks).As i did reflection and shifting operation combined,i found that the graph doesn't show any values of Y-axis for x less than zero.As i worked and improved the code,it now works almost fine but the problem is that the simple code is becoming to complex and i want to simplify it.So,in nutshell i want a simple way to avoid using a negative number to add to 'i' to print values on graph for x less than zero.
02-22-2014 09:23 AM
Now I can clearly see what you are talking about. You want X values from -100 to 100 (multiplied by some value, but that is beside the point). The method of just subtracting 100 is the easiest.
I cleaned up your code some. Check out the palettes a little closer. There's some very useful ones in there that you could use, like Greater Or Equal to Zero?, Absolute Value, and Negate.
02-22-2014 09:48 AM - edited 02-22-2014 11:13 AM
crossrulz wrote:I cleaned up your code some.
In addition, the terminals belong before the loop unless they can change while the loop is spinning. Since that would lead to unpredictable results, that's not what you want. IS requires significalty more effor to read the terminal with every iteration of the loop to see if it has changed.
Also note that xy graphs take complex data. No need for express VIs.
Most likely you don't even need an xy graph.
02-24-2014 07:20 AM
Thanks for the help.The program works fine and i am refining it. Since the output is continuous,what changes would you suggest to make it discrete...?
02-24-2014 07:33 AM
@ps293 wrote:
Since the output is continuous,what changes would you suggest to make it discrete...?
That makes very little sense. You probably need to explain exactly what you mean by all that.
02-24-2014 09:55 AM
I want my output to be visible only at integral value i.e. For n=1,2,3..the output should be 1 or 0(y axis) as per condition but in between 0 to 1 and 1 to 2..and so on...there must be no visible output at all.
02-24-2014 10:37 AM
@ps293 wrote:
I want my output to be visible only at integral value i.e. For n=1,2,3..the output should be 1 or 0(y axis) as per condition but in between 0 to 1 and 1 to 2..and so on...there must be no visible output at all.
your are only a few Right-Clicks away from what you want. (just a different way of showing the points- without the lines)