function [A,B,C,D,Entradas,Salidas]=inabcd(A,B,C,D,Parametros,controlador,Ganancia,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)
%
%[A,B,C,D,Inputs,Outputs]=inabcd(A,B,C,D,Parameters,controller,Gain,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)
%[A,B,C,D,Inputs,Outputs]=inabcd(A,B,C,D,Parameters,controller,Gain)
%
%INABCD
%
%   Function to generate the pairs Inputs-Outputs for each possible combinations
%   of the states of the plant given through xi. The number of states is
%   up to 10.
%   
%If no states hkare given as argument, then the function computes them. 
%If the possible values for these states hkare well known, it is recommended 
%to introduce them through xi. 
%
%   Once the pairs Input-Outputs have been obtained, the algorithms for 
%   searching possibles centres of the cone (Conicity criteria) may be runned with
%   A,B,C,D and inputs-Outputs as argument.
%   
%
%   A,B,C,D: internal representation of the linear plant.
%   Parameters: parameters(1) indicates if the controller is hkfuzzy or not.
%   The following values of parameter would be the arguments of the controller 
%   function if this one is not hkfuzzy but any function.
%   Controller: name of the controller (function). If it is a hkfuzzy controller then is
%   the name of the file fismat.
%   Gain: [+-1 +-1]. If the first one is set to -1 then the gain at the output of the
%   controller is set to +1. If the second one if set to -1 then the gain at the output
%   of the plant is set to -1. And the other way around. A gain value may be used instead 1.
%    For example: [-3 -2] would mean a gain of 3 at the output of the controller and of -2 
%    at the ouput of the plant. 
%   xi: The differents states values that will characterise the controller. It is recommended
%   not to include the zero in these values.
%
%   See also INSFUNC, NN2LN, CONSE_CC, CONSE_CO, CONSE_GR
%            CONSE_TE, CONSE_GA AND CONEVAL

%-----------------------------------------------
%  Departamento de Sistemas y Automatica
%  Universidad de Sevilla
%-----------------------------------------------
%  Archivo: entrada.m 
%  Proyecto:  FAMIMO
%  Bloque: conicidad
%  Uso: Funcion principal
%-----------------------------------------------
%  Toolbox usados:  Fuzzy Logic 1.0
%           Simulink 1.2c o superior.
%  Otras funciones usadas:  nn2ln.m, combina.m y x_n2lce.m
%-----------------------------------------------
%  Autor:  Juan Jose Murillo  
%  E-mail:  jmartin@cartuja.us.es
%  Fecha:  30/SEP/97
%-----------------------------------------------
%  Ultima modificacion
%   Fecha:  
%   Nombre: 
%
%   Version: 1.0
%-----------------------------------------------
%  Sistema:  MATLAB 4.2b o superior
%-----------------------------------------------

%-------------------------------------------------------------------------
%   Descripcion de las principales variables : 
%
%-------------------------------------------------------------------------

 %OJOJO Parametros={Parametros,};  % Solo en el caso de controladores de tipo "general"
 
if nargin==7

    tipoPlan=0;         % Tipos: 0 => "lineal" ; 1 => "no lineal".
    Estados=selesta(controlador,Ganancia,Parametros{1},A,B,C,D);
else 
    s='Estados=combina(x1';
    for i=2:(nargin-7)
        s=[s ',x' int2str(i)];
    end    
    s=[s ');'];
    eval(s);
end    
%%%%%%%%%%%%%%%%%%
% Transformacion %
%%%%%%%%%%%%%%%%%%

   
  %  Entradas=C*Estados;
    Entradas=Estados;
    Salidas=x_n2lce(controlador,Entradas,Ganancia,Parametros);





    
   


