% Copyright (C) 2001 Michel Juillard
%
function make_ex_
  global exe_ ex_ ex0_ xkmin_ xkmax_ exo_nbr options_
  
  options_ = set_default_option(options_,'periods',0);
  
  if isempty(exe_)
    exe_ = ones(exo_nbr,1);
  end
  
  
  if isempty(ex_)
    if isempty(ex0_)
      ex_ = [ones(xkmin_+options_.periods+xkmax_,1)*exe_'];
    else
      ex_ = [ones(xkmin_,1)*ex0_';ones(options_.periods+xkmax_,1)*exe_'];
    end
  elseif size(ex_,2) < length(exe_)
    k = size(ex_,2)+1:length(exe_)
    if isempty(ex0_)
      ex_ = [ex_ ones(xkmin_+size(ex_,1)+xkmax_,1)*exe_(k)'];
    else
      ex_ = [ex_ [ones(xkmin_,1)*ex0_(k)'; ones(size(ex_,1)-xkmin_+xkmax_, ...
						1)*exe_(k)']];
    end
  elseif size(ex_,1) < xkmin_+xkmax_+options_.periods
    if isempty(ex0_)
      ex_ = [ex_; ones(xkmin_+options_.periods+xkmax_-size(ex_,1),1)*exe_'];
    else
      ex_ = [ones(xkmin_,1)*ex0_'; ex_; ones(options_.periods+xkmax_-size(ex_, ...
						  1),1)*exe_'];
    end
  end
    
	     