Hi all , i want to cast the output of fuzzy logic algorithm into any another type (float , int ,double..), i tried this with usual methods but there is no change..
This is the complete java code
public static void main(String[] args)throws Exception {
String filename = "output.fcl";
FIS fis = FIS.load(filename, true);
if (fis == null) {
System.err.println("Can't load file: '" + filename + "'");
System.exit(1);
}
// Show
FunctionBlock fb = fis.getFunctionBlock(null);
// Set inputs
fb.setVariable("input1", 3 );
fb.setVariable("input2", 9.9);
// Evaluate
fb.evaluate();
JFuzzyChart.get().chart(fb);
// Show output variable's chart
Variable output = fb.getVariable("output");
JFuzzyChart.get().chart(output, output.getDefuzzifier(), true);
}
I'm especially talking about this line:
Variable output = fb.getVariable("output");