<< addrule sciFLT checkrule >>

sciFLT >> sciFLT > addvar

addvar

Add a new variable to a fls and return it

Calling Sequence

fls=addvar( fls_input , var_type , var_name , var_range )

Parameters

fls_input:

fuzzy logic system (as input).

fls:

fuzzy logic system (as output).

var_type:

string. "input" for input variable, "output" for output variable.

var_name:

string. Variable tag-name.

var_range:

row vector with two elements [minDom MaxDom]. Variable range, minDom for minimum value and maxDom for maximum value of the variable.

Description

addvar add a new variable to fuzzy logic system fls_input and return it with this change as fls. This command add the variable named var_name with range [minDom, maxDom] in the input or output (depends of var_type parameter). If the fuzzy logic system have rules, add a new column in rules reflecting the new variable.

Examples

fls=newfls("m");
fls=addvar(fls,"input","speed",[0 100]);
fls=addvar(fls,"input","wind",[0 100]);
fls=addvar(fls,"output","actuation",[0 10]);

See also

Authors


Report an issue
<< addrule sciFLT checkrule >>