01-24-2013 11:00 AM
A small spelling note: the word you want is "palettes," not "pellets."
01-27-2013 05:59 AM
Oh...thanks Nathand.
I won't repeat my mistake.
01-27-2013 09:08 AM
Hi Arihant,
Simulation VI's can only be place within control and simulation loop, found on the same palette.
01-27-2013 09:53 PM
Okay.
Then how am I supposed to use look up table function.
Actually I want to display a variable "y" for certain value of "x". there is no amthematical relation between them. All I have is values of Ys for values of X.
Thanks.
01-28-2013 12:44 PM
No need for the special lookup table function; use "Threshhold 1D Array" and "Interpolate 1D Array" as appropriate from the Array palette. For example you can use Interpolate 1D Array as shown in the image below; the only requirement is that the X values need to be unique and sorted in ascending order.
01-28-2013 10:02 PM
Thanks Nathand. That was helpful.
One more query I have-What if, say there is a band of values of x for which we get a fixed "y".
x=(0,0.5),y=1.3
x=(0.6,1),y=2.3
and so on.
01-29-2013 01:20 AM
arihant wrote:
One more query I have-What if, say there is a band of values of x for which we get a fixed "y".
x=(0,0.5),y=1.3
x=(0.6,1),y=2.3
and so on.
Just enter values for the start and end of the range, so you'll need a point at (X,Y) = (0,1.3) and (0.5, 1.3). Any X value in that range will return the same Y value because the endpoints are the same and the algorithm fits a line between them.
01-29-2013 11:16 AM - edited 01-29-2013 11:16 AM
If you only have two ramges, the straight line curve fit technique will work fine. If you have more than two ranges that you are comparing against, check out this recent thread. Though it doesn't sound like it from the title, they were wanting to do something very similar.
Mike...
01-29-2013 11:39 AM
@mikeporter wrote:
If you only have two ramges, the straight line curve fit technique will work fine. If you have more than two ranges that you are comparing against, check out this recent thread. Though it doesn't sound like it from the title, they were wanting to do something very similar.
I don't understand this comment. The lookup table approach I showed will handle any number of ranges. I did mis-state one thing: the X values do not need to be unique, they just need to be sorted in ascending order. If you have three ranges, you can do this:
X Y
0.0 1.3
0.5 1.3
0.5 2.3
1.2 2.3
1.2 4.0
2.0 4.0
01-29-2013 11:31 PM
If you have three ranges, you can do this:
X Y
0.0 1.3
0.5 1.3
0.5 2.3
1.2 2.3
1.2 4.0
2.0 4.0
Hi Nathand,
As per your solution, what will be the output (y) for x=0.5 (and x=1.2 for same case)?
Will it return y=1.3 or 2.3 (and 2.3 or 4.0)?
When I tried the ranges you mentioned, result was displayed for larger "y".I dont know the reason. I changed the ranges as follows and it working:
X Y
0.0 1.3
0.5 1.3
0.6 2.3
1.0 2.3
1.1 2.9
and so on..
Thanks.