function [Qz1,Qz2,Qp1,Qp2,Qzp2]=finn_Qzpij(dist_zeros,dist_poles, Gms)
%This is for the SISO-case where input/output-directions are equal to 1.
%Qz1
for ii=1:length(dist_zeros)
    for jj=1:length(dist_zeros)
        Qz1(ii,jj)=1/(dist_zeros(ii)+conj(dist_zeros(jj)));
    end
end

%Qz2
for ii=1:length(dist_zeros)
    for jj=1:length(dist_zeros)
        Qz2(ii,jj)=evalfr(Gms,dist_zeros(ii))*evalfr(Gms,dist_zeros(jj))/(dist_zeros(ii)+conj(dist_zeros(jj)));
    end
end

%Qp1
for ii=1:length(dist_poles)
    for jj=1:length(dist_poles)
        Qp1(ii,jj)=1/(conj(dist_poles(ii))+dist_poles(jj));
    end
end

%Qp2
for ii=1:length(dist_poles)
    for jj=1:length(dist_poles)
        Qp2(ii,jj)=(pinv(evalfr(Gms,dist_poles(ii))))'*pinv(evalfr(Gms,dist_poles(jj)))/(conj(dist_poles(ii))+dist_poles(jj));
    end
end

%Trenger ikke Qzp1

%Qzp2
for ii=1:length(dist_zeros)
    for jj=1:length(dist_poles)
        Qzp2=evalfr(Gms, dist_zeros(ii))*pinv(evalfr(Gms,dist_poles(jj)))/(dist_zeros(ii)-dist_poles(jj));
    end
end


end