%...........Concatenate values to vector along longest dimension...........
%Author: James Bramante
%Date: September 4, 2015

function vect = vect_cat(protoNum,varargin)

 [a,b] = size(varargin{protoNum});
 [~, ind] = max([a,b]);
 
 vect = varargin{1};
 [a1,b1] = size(vect);
 [~,ind1] = max([a1,b1]);
 if ind ~= ind1
     vect = vect';
 end
 
 for x = 2 : length(varargin)
     [a1,b1] = size(varargin{x});
     [~,ind1] = max([a1,b1]);
     if ind == ind1
         vect = cat(ind,vect,varargin{x});
     else
         vect = cat(ind,vect,varargin{x}');
     end
 end
 
end