Download portable C code
Transcript
fuzzyTECH® 5.3 User’s Manual
Inform Software Corporation
/* Example 1: MYMAIN.C */
/* single fuzzy project, function parameters, integer data type */
#include "myproj.h"
...
...
void main(void) {
FUZZY myin1, myin2,..;
FUZZY myout1, myout2,..;
FLAGS rv;
...
initmyproj();
...
while(!stop) {
...
myin1 = ...
myin2 = ...
...
rv = myproj(myin1, myin2,..,
&myout1, &myout2,..);
... = myout1;
... = myout2;
...
}
...
}
287
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
include fuzzy system
more includes
more declarations
main program
declare local variables
declare local variables
declare return value
more code
initialize fuzzy system
more code
control loop
more code
set the input variable
set the input variable
more code
call the fuzzy system
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
use the output variables */
use the output variables */
more code
*/
end of control loop
*/
more code
*/
end of main program
*/