06-19-2014 04:25 AM
hello everyone
in labview can we make range of integers like
where a=10 , x has some value
b = (1:a)*x;
c=[1 , d(1 : a-1)];
can anyone tell me how to implement these two functions in labview
06-19-2014 05:20 AM
are you looking for "in range and coerce" function?
06-19-2014 05:22 AM
i am trying to implement these functions but these functions have range ,
i dont know how to put range in labview
06-19-2014 05:35 AM
I meant the function is readily available in labview
06-19-2014 06:03 AM
I don't understand your notation, but you might find a For loop helpful. You can put your expressions inside the loop and evaluate it over the range as the loop executes, or you can wire "i" out and put the expression outside of the loop to operate on the values as an array.
06-19-2014 07:12 AM
in range and corge is not what i am searching for
it just checks whether this integer x lies in the given range or not
i want to give range not want to check
06-19-2014 07:30 AM - edited 06-19-2014 07:31 AM
The case structure input can be configured to specify multiple integer values separated by commas and also ranges denoted by ellipsis...
http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/case_selector_values/
06-19-2014 07:38 AM
I'm with jmarcody, you want to use the FOR loop with autoindexing the values out. The result will be an array of numbers.
06-19-2014 09:54 AM
I think you are looking for something like the Ramp Pattern.vi
http://zone.ni.com/reference/en-XX/help/371361K-01/lvanls/ramp_pattern/
06-19-2014 11:02 AM
Also, math functions can work on arrays in their entirety. You don't necessarily need to index through an array to operate on each element individually.
Though depending on the function, or the complication in the math, you may need to iterate through the array, and For Loops with auto-indexing are a big help there.