% HEAT EXCHANGER 5

function [sys,x0] = HX5(t,x,u,flag)

HXindex = 5; % HX number
N = 10; % Model order


if abs(flag) == 1
    sys = Dynamic(t,x,u,N,HXindex);
    
elseif abs(flag) == 3
    sys(1,1) = x(N); % Outlet hot temperature
    sys(2,1) = x(3*N); % Outlet cold temperature (Tend)
    
elseif flag == 0
    x0 = ssvar(HXindex,N);
    sys = [3*N,0,2,4,0,0];
    
else
   sys = [];
   
end

end
