    function T = transitionjeff(G1, G2)
    
    n = max(size(G1));
    %G1T = G1';
    G1;
    G2;
    G1sym = sym('G1', [n n]);
    G2sym = sym('G2', [n n]);
    Tsym = sym('T', [n n]);
    %TsymT = sym('T', [n n]);
%     for i=1:n
%         for j=1:n
%             TsymT(j,i) = Tsym(i,j);
%         end
%     end
%     TEqnsym = Tsym*G1sym- G2sym*Tsym;
    TEqnsym = Tsym*G1- G2*Tsym;
%     for i=1:n
%         for j=1:n
%             TEqnsym = subs(TEqnsym,G1sym(i,j),G1(i,j));
%             TEqnsym = subs(TEqnsym,G2sym(i,j),G2(i,j));
%         end
%     end
    TEqnsym;
    Robbin = sym('R', [n^2 n^2]);
    Moms = eye(n^2);
    for i=1:n^2
        for j = 1:n^2
%             i
%             j
%             round((i-0.5)/n^2)+1
%             mod(i-1,n)+1
            Robbin(i,j) = TEqnsym(round((i-0.5)/n^2)+1,mod(i-1,n)+1);
            for k=1:n^2
%                 k
%                 n^2;
%                 n;
%                   k
%                   j
%                   floor((k-0.5)/n)+1
%                   mod(k-1,n)+1
                Robbin(i,j)=subs(Robbin(i,j),Tsym(floor((k-0.5)/n)+1,mod(k-1,n)+1),Moms(k,j));
            end
        end
    end
    Robbin;
    TRobbin = randsoln(Robbin,zeros(n^2,1));
    %T = [TRobbin(1,1) TRobbin(2,1); TRobbin(3,1) TRobbin(4,1)];
    T = zeros(n,n);
    for i=1:n
        for j=1:n
%             i
%             j
%             %(i-0.5)/n
%             n*(i-1)
%             n*(i-1)+j
            T(i,j) = TRobbin(n*(i-1)+j,1);
        end
    end
   