Documentation Center

  • Trials
  • Product Updates

setfis

Set fuzzy system properties

Syntax

a = setfis(a,'fispropname','newfisprop')
a = setfis(a,'vartype',varindex,'varpropname',newvarprop)
a = setfis(a,'vartype',varindex,'mf',mfindex,...,'mfpropname',newmfprop)

Description

The command setfis can be called with three, five, or seven input arguments, depending on whether you want to set a property of the entire FIS structure, for a particular variable belonging to that FIS structure, or for a particular membership function belonging to one of those variables. The arguments are:

  • a — a variable name of a FIS from the workspace

  • 'vartype' — a string indicating the variable type: input or output

  • varindex — the index of the input or output variable

  • 'mf' — a required string for the fourth argument of a seven-argument call for setfis, indicating this variable is a membership function

  • mfindex — the index of the membership function belonging to the chosen variable

  • 'fispropname' — a string indicating the property of the FIS field you want to set: name, type, andmethod, ormethod, impmethod, aggmethod, defuzzmethod

  • 'newfisprop' — a string describing the name of the FIS property or method you want to set

  • 'varpropname' — a string indicating the name of the variable field you want to set: name or range

  • newvarprop — a string describing the name of the variable you want to set (for name), or an array describing the range of that variable (for range)

  • 'mfpropname' — a string indicating the name of the membership function field you want to set: name, type, or params.

  • 'newmfprop' — a string describing the name or type of the membership function field want to set (for name or type), or an array describing the range of the parameters (for params)

Examples

setfis is called with three arguments:

a = readfis('tipper');
a2 = setfis(a, 'name', 'eating');	
getfis(a2, 'name');

which results in

out =
eating

If it is used with five arguments, setfis updates two variable properties.

a2 = setfis(a,'input',1,'name','help');
getfis(a2,'input',1,'name')
ans =
	help

If used with seven arguments, setfis updates any of several membership function properties.

a2 = setfis(a,'input',1,'mf',2,'name','wretched');
getfis(a2,'input',1,'mf',2,'name')
ans =
	wretched

See Also

Was this topic helpful?