function data = get_data_MT(x1,x2,Q,freq,RX)

data = table;
nfreq = length(freq);
omega = 2*pi*freq;
for ifreq =1:nfreq

    Ex1 = Q.Ex*x1(:,ifreq);
    Ey1 = Q.Ey*x1(:,ifreq);
    Hx1 = (-1i/omega(ifreq))*Q.Hx*x1(:,ifreq);
    Hy1 = (-1i/omega(ifreq))*Q.Hy*x1(:,ifreq);
    Hz1 = (-1i/omega(ifreq))*Q.Hz*x1(:,ifreq);

    Ex2 = Q.Ex*x2(:,ifreq);
    Ey2 = Q.Ey*x2(:,ifreq);
    Hx2 = (-1i/omega(ifreq))*Q.Hx*x2(:,ifreq);
    Hy2 = (-1i/omega(ifreq))*Q.Hy*x2(:,ifreq);
    Hz2 = (-1i/omega(ifreq))*Q.Hz*x2(:,ifreq);

    mtr        = get_MTR(Ex1,Ey1,Hx1,Hy1,Hz1,Ex2,Ey2,Hx2,Hy2,Hz2,freq(ifreq));
    Frequency  = repmat(freq(ifreq),size(Ex1,1),1);
    % RX         = find(irec==idaom);

    dtemp = table(Frequency,RX,Ex1,Ey1,Hx1,Hy1,Hz1,Ex2,Ey2,Hx2,Hy2,Hz2,...
        mtr.Zxx, mtr.Zxy, mtr.Zyx, mtr.Zyy,mtr.rhoXX, mtr.rhoXY, mtr.rhoYX, mtr.rhoYY,...
        mtr.phaXX, mtr.phaXY, mtr.phaYX, mtr.phaYY,mtr.Tzx,mtr.Tzy,...
        'VariableNames',{'Frequency';'RX';'Ex1';'Ey1';'Hx1';'Hy1';'Hz1';'Ex2';...
        'Ey2';'Hx2';'Hy2';'Hz2';'Zxx';'Zxy';'Zyx';'Zyy';'rhoXX';'rhoXY';'rhoYX';'rhoYY'; ...
        'phaXX';'phaXY';'phaYX';'phaYY';'Tzx';'Tzy'});
     data = cat(1,data,dtemp);

end