%MATLAB SCRIPT FILE vec2matt.m  */
%
%    FOR DEVELOPMENT AND TESTING OF MATLAB FUNCTION vec2mat,
%    WHICH COPIES A VECTOR INTO A MATRIX

itest = 4 ;     %  1,2,3,4

format compact ;
disp([10 'MATLAB script vec2mat.m, test #' num2str(itest) 10]) ;


if itest == 1 ;   
  v = 1:2:7 ;
  n = 5 ; 
elseif itest == 2 ; 
  v = rand(4,1) ;
  n = 3 ;
elseif itest == 3 ; 
  v = ones(2,2) ;
  n = 7 ;
elseif itest == 4 ; 
  v = 1 ;
  n = 7 ;
end ;

disp(['for num = ' num2str(n) ' and the input vector:']) ;
v

disp('    Result is:')
out = vec2mat(v,n) ;
out

