\newpage \noindent {\bf \huge mamdani}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
build a mamdami object

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m=mamdani(varargin)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m=mamdani(varargin)} 

\end{description}

\begin{description}
 \item[Methods]\ \\ 
\begin{itemize}
\item {\tt add\_rules}   add specified number of rules
\item {\tt add\_sets}   Add fuzzy sets along one or more dimension of the space

\item {\tt check}   checks the consistency of all the field of a mamdani object
\item {\tt denormalize}   denormalises the model
\item {\tt display}   Display an object of class mamdani

\item {\tt eval}   computes the value of the model
\item {\tt get}   gets the value of the attribute of an object
\item {\tt identify}   identifies a fuzzy model from data
\item {\tt jacob\_inputs}   computes the jacobian of the model
\item {\tt jacob\_params}   computes the jacobian of the model
\item {\tt membership}   Compute the degree of fullfilment of the rules of a mamdani function
\item {\tt normalise}   normalises the model M
\item {\tt plot}   performs a plot of the a mamdani model
\item {\tt rem\_rules}   remove the specified rules from the mamdani object

\item {\tt rem\_sets}   remove the specified sets from the mamdani object

\item {\tt rules\_parser}   parses rules in order to populate the rules base of a mamdani model
\item {\tt set}   set object properties
\item {\tt sets\_grid}   Remove every fuzzy sets and replace them by evenly spaced ones

\end{itemize}
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 


\end{description}
\newpage \noindent {\bf \huge add\_rules}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
add specified number of rules
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt add\_rules(m,n)  }\\ 
{\tt add\_rules(m,n,model\_code)  }\\ 
{\tt add\_rules(m,n,model\_code,mode)  }\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt add\_rules(m,n)  } 
add {\tt n} rules to the model {\tt m}.
\vspace{4mm}\\ 
\hspace{2mm}
{\tt add\_rules(m,n,model\_code)  } 
add {\tt n} rules to the model {\tt m}, {\tt model\_code} is 
a cell array of two elements {x y} where x is the T-norm used (only 'product' is currently implemented)
and y is defuzzification method ('meancentroid').
\vspace{4mm}\\ 
\hspace{2mm}
{\tt add\_rules(m,n,model\_code,mode)  } 
mode can take the value 'standard' or 'rulegrid'. In lhe latter
case, the position of the rules is initialised in order to fill the space according
to the position of the fuzzy sets along the the different dimensions.
\end{description}

\begin{description}
 \item[Remarks]\ \newline \newline 
This function is used to 
specify the number and shape of the rules associated to the
TS model. 

\end{description}
\newpage \noindent {\bf \huge add\_sets}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Add fuzzy sets along one or more dimension of the space

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m = add\_sets(m,i,n,t)}\\ 
{\tt m = add\_sets(m,i,n,t)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m = add\_sets(m,i,n,t)} 
adds {\tt n} sets to the dimension {\tt i}
of the Mamdani Function {\tt m}. The sets are of type t
Accepted values for {\tt t} are 'constant, 'trapezoidal','gaussian'
and 's-shaped'.
\vspace{4mm}\\ 
\hspace{2mm}
{\tt m = add\_sets(m,i,n,t)} 
where {\tt n} where n is a cell array of linguistic
values attaches the corresponding sets to the dimension <CODE>i<CODE>.
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 


\end{description}
\newpage \noindent {\bf \huge check}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
checks the consistency of all the field of a mamdani object
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt check(m)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt check(m)} 
check the consistency of a mamdani object.
\end{description}

\begin{description}
 \item[Remarks]\ \newline \newline 
This function has been provided in order to make the mamdani class
more robust since it checks a mamdani object for consistency of
the data defined in its fields. If a inconsistency is found, an 
error message is displayed.

\end{description}
\newpage \noindent {\bf \huge denormalize}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
denormalises the model
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m=denomalise(m)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m=denomalise(m)} 
denormalzes the model {\tt m}.
\end{description}

\begin{description}
 \item[Remarks]\ \newline \newline 
This function 
can be applied to denormalise a model that has been previously 
normalised with the function {\tt normalise}
restoring the original shape of the local representation of the
model.

\end{description}

\begin{description}
 \item[See also]\ \newline \newline 
normalize

\end{description}
\newpage \noindent {\bf \huge display}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Display an object of class mamdani

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt display(m)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt display(m)} 
Display the object m of class mamdani
%
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 


\end{description}
\newpage \noindent {\bf \huge eval}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
computes the value of the model
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt out=eval(m,x,j)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt out=eval(m,x,j)} 
returns the value {\tt out} for the output(s) {\tt j} of
model {\tt m} given the input {\tt x}.
\end{description}

\begin{description}
 \item[Remarks]\ \newline \newline 
This function
returns the output of system as computated by the model, given 
a regressor. 

\end{description}
\newpage \noindent {\bf \huge get}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
gets the value of the attribute of an object
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt d = get(m,label)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt d = get(m,label)} 
gets the value of the attribute {\tt label}
associated to the object {\tt m} and return it inside {\tt d}.
The following codes are recognised:
\\  
\begin{tabular}{lp{12cm}}
{\tt name}: & returns the name of the object \\ 
{\tt n\_in}: & returns the number of inputs of the mapping \\ 
{\tt n\_out}: & returns the number of outputs of the mapping \\ 
{\tt userData}: & returns the 'userData' field \\ 
{\tt opt}: & returns the 'opt' field \\ 
{\tt date}: & returns the date of creation of the object \\ 
{\tt limits}: & returns the limits of the mapping \\ 
{\tt optimparams}: & returns the indices of the parameters to be optimised \\ 
{\tt numparams}: & returns the number of parameters to be optimised \\ 
{\tt n\_rules}: & returns the number of rules associated to the
taksug model \\ 
{\tt model\_code}: & returns the code of the model associated to the \\ 
{\tt rls}: & returns the fuzzy sets associated to the taksug
model \\ 
{\tt mfs}: & returns the definition of the rules of the taksug model \\ 
{\tt params}: & returns every parameters to be optimised in the shape of a vector \\ 
\end{tabular} \\ 

\end{description}

\begin{description}
 \item[See also]\ \newline \newline 
set

\end{description}
\newpage \noindent {\bf \huge identify}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
identifies a fuzzy model from data
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m=identify(m,in,out,options) }\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m=identify(m,in,out,options) } 
identify model {\tt m} on the basis of the data
inside {\tt in} and {\tt out} using method specified in {\tt options}.
\end{description}
\newpage \noindent {\bf \huge jacob\_inputs}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
computes the jacobian of the model
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt jacob\_inputs(m,x)}\\ 
{\tt jacob\_inputs(m,x,j)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt jacob\_inputs(m,x)} 
computes for each output the jacobian of
the model with respect to the x (the input of the
linear) at point {\tt x}.
\vspace{4mm}\\ 
\hspace{2mm}
{\tt jacob\_inputs(m,x,j)} 
computes for output J the jacobian of
the model with respect to the x (the input of the
linear) at point {\tt x}.
\end{description}

\begin{description}
 \item[Remarks]\ \newline \newline 
The procedure for computing the jacobian depends on the underlying representation 
of the model. The result {\tt out} is an array of size number of outputs * number of inputs
containing the derivatives of the outputs with respect to the inputs.

\end{description}
\newpage \noindent {\bf \huge jacob\_params}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
computes the jacobian of the model
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt jacob\_params(m,x)  }\\ 
{\tt jacob\_params(m,x,j)  }\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt jacob\_params(m,x)  } 
computes for each output the jacobian of
the model with respect to the parameters at input {\tt x}.
\vspace{4mm}\\ 
\hspace{2mm}
{\tt jacob\_params(m,x,j)  } 
computes for output(s) {\tt j} the jacobian of
the model with respect to the parameters at input {\tt x}.
\end{description}
\newpage \noindent {\bf \huge membership}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Compute the degree of fullfilment of the rules of a mamdani function
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt out = membership(m,x)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt out = membership(m,x)} 
%
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 


\end{description}
\newpage \noindent {\bf \huge normalise}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
normalises the model M
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m=normalise(m)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m=normalise(m)} 
normalises the model {\tt m}
\end{description}
\newpage \noindent {\bf \huge plot}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
performs a plot of the a mamdani model
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt f=plot(m) }\\ 
{\tt f=plot(m,options) }\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt f=plot(m) } 
opens a new figure if needed and plots the model
{\tt m}. A complete user interface is set to allow advanced visualisation
options to be selected.
\vspace{4mm}\\ 
\hspace{2mm}
{\tt f=plot(m,options) } 
opens a new figure if needed and plots the model
{\tt m}. {\tt options} are passed to the drawing engine.
\end{description}
\newpage \noindent {\bf \huge rem\_rules}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
remove the specified rules from the mamdani object

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m=rem\_rules(m)}\\ 
{\tt m=rem\_rules(m,n)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m=rem\_rules(m)} 
remove all rules from model {\tt m}.
\vspace{4mm}\\ 
\hspace{2mm}
{\tt m=rem\_rules(m,n)} 
remove rules number {\tt n} from model {\tt m}.
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 


\end{description}
\newpage \noindent {\bf \huge rem\_sets}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
remove the specified sets from the mamdani object

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m=rem\_sets(m,i)}\\ 
{\tt m=rem\_sets(m,i,n)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m=rem\_sets(m,i)} 
remove all sets from output i of model {\tt m}.
\vspace{4mm}\\ 
\hspace{2mm}
{\tt m=rem\_sets(m,i,n)} 
remove sets number {\tt n} from output i of model {\tt m}.
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 


\end{description}
\newpage \noindent {\bf \huge rules\_parser}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
parses rules in order to populate the rules base of a mamdani model
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m=rules\_parser(m,rules)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m=rules\_parser(m,rules)} 

\end{description}

\begin{description}
 \item[See also]\ \newline \newline 


\end{description}
\newpage \noindent {\bf \huge set}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
set object properties
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m=set(m,label1,value1,label2,value2,...)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m=set(m,label1,value1,label2,value2,...)} 
sets the value {\tt value} of the attribute {\tt label}
associated to the object {\tt m}. The following codes are recognised:
\\  
\begin{tabular}{lp{12cm}}
{\tt name}: & sets the name of the object \\ 
{\tt n\_in}: & sets the number of inputs of the model. This
sets the saturation level of the inputs to 
-Inf, Inf. \\ 
{\tt n\_out}: & sets the number of outputs of the model \\ 
{\tt userData}: & sets the 'userData' field \\ 
{\tt opt}: & sets the 'opt' field \\ 
{\tt date}: & sets the date of creation of the object \\ 
{\tt limits}: & sets the limits of the mapping \\ 
{\tt optimparams}: & sets the indices of the parameters to be optimised \\ 
{\tt model\_code}: & sets the type of rules associated to the
mapping model \\ 
{\tt rls}: & sets the fuzzy sets associated to the mapping
model \\ 
{\tt rl}: & sets one fuzzy set associated to the mapping
model \\ 
{\tt mfs}: & sets the definition of the rules of the mapping model \\ 
{\tt mf}: & sets the definition of one rule of the mapping model \\ 
{\tt ling}: & sets the linguistical representation of the sets (the name of the sets) \\ 
{\tt varnames}: & sets the name of the variables \\ 
{\tt mftype}: & sets the type of a set. {\tt value} is 3 elements cell array
{a b c} where a is the number of the input, b is the index of the set
and c is the type ('constant', 'trapezoidal', 's-shaped' or 'gaussian') \\ 
{\tt params}: & sets every parameters to be optimised providing a vector \\ 
\end{tabular} \\ 

\end{description}

\begin{description}
 \item[Remarks]\ \newline \newline 
General pupose function for 
setting the values of the fields of a mamdani object. For setting 
the rules, use the {\tt add\_rules}, {\tt rem\_rules} and
{\tt add\_sets} function.
This method
extends the 'set' method defined in the mapping class. 

\end{description}

\begin{description}
 \item[See also]\ \newline \newline 
get, add\_dynamics, add\_data, add\_rules

\end{description}
\newpage \noindent {\bf \huge sets\_grid}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Remove every fuzzy sets and replace them by evenly spaced ones

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m = sets\_grid(m, d1, d2, d3, d4..., t)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m = sets\_grid(m, d1, d2, d3, d4..., t)} 
places {\tt d1} sets of type {\tt t} along the dimension {\tt 1},
{\tt d2} sets along the dimension {\tt 2}, etc... The position of the
sets is computed on the basis of the limits attribute. The previously defined rules and
sets are removed.
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 
add\_setss

\end{description}
