function [f,g,m] = inputeig(n)

ts = sym('ts'); 

% A 5 by 5 or smaller examples (4 x 4, 3 x 3, 2 x 2, 1 x 1) with actual 
%   dimensions determined by the input n

% example 1 below,   set  1 <= n <= 5              !

%   Ats = [sin(ts),exp(sin(ts)),10-3*ts+4*ts^2+sin(ts),0,ts; % example 1
%         exp(sin(ts)),cos(ts),(2+ts^2-ts^4)/(1+ts),sin(ts^2-1)*cos(2*ts),(ts^2+1)/(2*ts+1);
%         10-3*ts+4*ts^2+sin(ts),(2+ts^2-ts^4)/(1+ts),(1-cos(ts))/(3+sin(ts))^2,17*ts-ts^2,exp(ts);
%         0,sin(ts^2-1)*cos(2*ts),17*ts-ts^2,sin(exp(ts)),exp(cos(7*ts));
%         ts,(ts^2+1)/(2*ts+1),exp(ts),exp(cos(7*ts)),-ts^3]; 

% example 2 below,   set 1 <= n <= 3               !

%   Ats = [sin(ts), exp(sin(ts)),1;
%          exp(sin(ts)), cos(ts), atan(ts); 
%          1, atan(ts), 1];

% example 3 below,   set  1 <= n <= 5              !

  Ats = [sin(ts)+2,   exp(sin(ts)), -exp(sin(ts)),    1/2,       1+cos(ts);
       exp(sin(ts)),   cos(ts)-2,         1,        cos(2*ts),      1;
       -exp(sin(ts)),      1,          1/(ts+1),    atan(ts),    sin(2*ts);
            1/2,       cos(2*ts),      atan(ts),       1,       exp(cos(ts));
         1+cos(ts),        1,          sin(2*ts)  exp(cos(ts)),   1/(ts+2)];  

% Ats = [sin(ts)+1, exp(sin(ts)), -exp(sin(ts)), 1/2, 1+cos(ts);
%       exp(sin(ts)), cos(ts)-2, 1, cos(2*ts), 1;
%       -exp(sin(ts)), 1, 1/(ts+1), atan(ts), sin(2*ts);
%       1/2, cos(2*ts), atan(ts), 1, exp(cos(ts));
%       1+cos(ts), 1, sin(2*ts),exp(cos(ts)), 1/(ts+2)];
%     
       %  enter given function A(t) above 
 
% Ats = Ats(1:n,1:n);  % function A(ts) symbolic output, a matrix of size n by n
  %Ats = blkdiag(Ats,-Ats); Ats = blkdiag(Ats,Ats*Ats');
  %Ats = blkdiag(2*Ats,-3*Ats); %Ats = blkdiag(Ats,-2*Ats'); 
  % Ats = blkdiag(4*Ats,2*Ats);
  %Ats = blkdiag(0.975*Ats,-5.876*Ats); % Make Ats matrix larger (m >> n) by
                                        % removing  % signs and work with
                                        % block diagonal matrices
 m = length(Ats)  % m = Size of the examlpe matrix, n = size of the kernel matrix for Ats
 
 dAts = diff(Ats);    % derivative function dA(ts) symbolic output
  
 f = matlabFunction(Ats);   % f and g  to be used in main m files 
 g = matlabFunction(dAts);  %    Zmatrixeig6...
end

