home › Forums › # Technical Support › Converting Matlab .fis file to C code › Reply To: Converting Matlab .fis file to C code
November 16, 2016 at 15:16
#2278
Member
i find the solution, it was too easy:
int main(int argc, char **argv)
{
fl::Engine* engine = fl::FisImporter().fromFile("/home/ruben/fuzzy.fis");
engine->getInputVariable(0)->setInputValue(15);
engine->getInputVariable(1)->setInputValue(0.32);
engine->process();
fl::OutputVariable* output = engine->getOutputVariable("Angulo");
printf("%f\n",output->getOutputValue());
}
I get 9.649305 vs 9.6498 (by octave) very good I think.