Quote from the Fuzzy Logic Toolbox User's Guide:
Constraints of anfis:
anfis is much more complex than the fuzzy
inference systems discussed so far, and is not available for all of
the fuzzy inference system options. Specifically, anfis only supports
Sugeno-type systems, and these must have the following properties:
* Have no rule sharing. Different rules cannot share the same output
membership function, namely the number of output membership functions
must be equal to the number of rules.
The ANFIS model structure should therefore look like this:

FYI the error comes from the following code snippet:
/* output MF no. must be the same as rule no. */
if (fis->output[0]->mf_n != fis->rule_n) {
fisFreeFisNode(fis);
PRINTF("Number of output MF's is not equal to number of rules -->\n");
fisError("Parameter sharing in FIS is not allowed!");
}