function [f,g]=col4_lin(X,u)
%
% cola4_lin - This function designed for use with 'cola_linearize.m' to
%        create a linear model of a distillation column.
%        The number '4' denotes that there are 4 inputs (L,V,D,B)
%        plus the disturbances. 
%
%     x - states (liquid composition and liquid hold up)
%     u - inputs (reflux LT, boilup VB, distillate D, bottoms B) and
%          disturbances (feedrate F, qF and feed composition zF)
%
%  NOTE: Everything here is row vectors rather than columnn vectors...
% 07nov2005: Had to change u back to column vector to make it work...

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

NT=41; NC=4;

% Splitting the states
x1=X(1:NT);                % Liquid composition of component 1
M=X((NC-1)*NT+1:NC*NT);    % holdups 
% This variable is not used
t=0;

xprime=multicomA(t,X',u);

% Output
f=xprime';
g=[x1(NT),x1(1),M(NT),M(1)];



