10-19-2005 04:53 AM
10-19-2005 05:41 AM
10-19-2005 05:49 AM
10-19-2005 05:54 AM
TSreedhar a écrit:Hi,The best way is to use the "Formula Node" and write the complete C code in it.
10-19-2005 06:55 AM
srt wrote:
if 0<= x<=0.05, d=4;else if 0.5 <x <= 0.1 d=3.5;else if 0.1 <x <=0.2, d=3;else if 0.1 <x <= 0.2, d=2.5;.........else if 1.6 <x<=3, d=0.5;<=3, d="0.5;
This is just an example, right?
You are not trying to assign a value to d = 3 or 2.5 based on 0.1<x<=0.2
If the above formula is true, then what value gets assigned if x is between 0.11 to 0.2?
I would implement the approach suggested by CC.
Ray
10-19-2005 07:52 AM
And yet another "G-reat" approach uses the in-range and search 1-d array to give you the ability to
change ranges and "D" values at run-time by replacing the constants with controls.
X is compared with each of the ranges specified by the costants.
The resulting boolean array is searched for the first "true" and the index tells which "D" value to select.
Ben
10-19-2005 08:16 AM
10-19-2005 08:59 AM - edited 10-19-2005 08:59 AM
Message Edité par chilly charly le 10-19-2005 04:01 PM
10-19-2005 12:33 PM
10-20-2005 12:15 AM