function [DCalTuLTot,DCalRLTot,DCalTLHTot,DCalTLHRHTot,DCalPCLTot,DCalPCLHRTot,...
    DCalPLTot,DCalLLTot,DCalELTot,DCalEL3DTot,DCalWELTot,DCalMPBELTot,DCalALTot,...
    DCalCrLTot,DCal3DCrLTot,DCal2DCrLTot] = NuovaConversione(DCalTuLTot,yesTuL,DCalRLTot,yesRL,...
    DCalTLHTot,yesTLH,DCalTLHRHTot,yesTLHRH,DCalPCLTot,yesPCL,DCalPCLHRTot,yesPCLHR,...
    DCalPLTot,yesPL,DCalLLTot,yesLL,DCalELTot,yesEL,DCalEL3DTot,yes3DEL,DCalWELTot,yesWEL,...
    DCalMPBELTot,yesMPBEL,DCalALTot,yesAL,DCalCrLTot,yesCrL,DCal3DCrLTot,yes3DCrL,...
    DCal2DCrLTot,yes2DCrL,FileName)

% Conversione del formato dati che usiamo con il database Ase_New

%% Tunnel Link
[r,c] = size(DCalTuLTot); 
MATconv = zeros(r,c);
if yesTuL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalTuLTot{ii,jj};
        end
    end
    DCalTuLTot = MATconv;
end

%% Radial Link
[r,c] = size(DCalRLTot); 
MATconv = zeros(r,c);
if yesRL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalRLTot{ii,jj};
        end
    end
    DCalRLTot = MATconv;
end

%% Tilt Link H
[r,c] = size(DCalTLHTot); 
MATconv = zeros(r,c);
if yesTLH==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalTLHTot{ii,jj};
        end
    end
    DCalTLHTot = MATconv;
end

%% Tilt Link HR H
[r,c] = size(DCalTLHRHTot); 
MATconv = zeros(r,c);
if yesTLHRH==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalTLHRHTot{ii,jj};
        end
    end
    DCalTLHRHTot = MATconv;
end

%% PreConv Link
[r,c] = size(DCalPCLTot); 
MATconv = zeros(r,c);
if yesPCL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalPCLTot{ii,jj};
        end
    end
    DCalPCLTot = MATconv;
end

%% PreConv Link HR
[r,c] = size(DCalPCLHRTot); 
MATconv = zeros(r,c);
if yesPCLHR==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalPCLHRTot{ii,jj};
        end
    end
    DCalPCLHRTot = MATconv;
end

%% Pressure Link
[r,c] = size(DCalPLTot); 
MATconv = zeros(r,c);
if yesPL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalPLTot{ii,jj};
        end
    end
    DCalPLTot = MATconv;
end

%% Load Link
[r,c] = size(DCalLLTot); 
MATconv = zeros(r,c);
if yesLL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            if DCalLLTot{ii,jj} == []
                MATconv(ii,jj) = [];
            else
                MATconv(ii,jj) = DCalLLTot{ii,jj};
            end
        end
    end
    DCalLLTot = MATconv;
end

%% Extensometer Link
[r,c] = size(DCalELTot); 
MATconv = zeros(r,c);
if yesEL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalELTot{ii,jj};
        end
    end
    DCalELTot = MATconv;
end

%% 3D Extensometer Link
[r,c] = size(DCalEL3DTot); 
MATconv = zeros(r,c);
if yes3DEL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalEL3DTot{ii,jj};
        end
    end
    DCalEL3DTot = MATconv;
end

%% Wire Extensometer Link
[r,c] = size(DCalWELTot); 
MATconv = zeros(r,c);
if yesWEL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalWELTot{ii,jj};
        end
    end
    DCalWELTot = MATconv;
end

%% Multi Point Borehole Extensometer Link
[r,c] = size(DCalMPBELTot); 
MATconv = zeros(r,c);
if yesMPBEL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalMPBELTot{ii,jj};
        end
    end
    DCalMPBELTot = MATconv;
end

%% Analog Link
[r,c] = size(DCalALTot); 
MATconv = zeros(r,c);
if yesAL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalALTot{ii,jj};
        end
    end
    DCalALTot = MATconv;
end

%% Crack Link
[r,c] = size(DCalCrLTot); 
MATconv = zeros(r,c);
if yesCrL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCalCrLTot{ii,jj};
        end
    end
    DCalCrLTot = MATconv;
end

%% 3D Crack Link
[r,c] = size(DCal3DCrLTot); 
MATconv = zeros(r,c);
if yes3DCrL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCal3DCrLTot{ii,jj};
        end
    end
    DCal3DCrLTot = MATconv;
end

%% 2D Crack Link
[r,c] = size(DCal2DCrLTot); 
MATconv = zeros(r,c);
if yes2DCrL==0 % Non ci sono dati
else
    for ii = 1:r
        for jj = 1:c
            MATconv(ii,jj) = DCal2DCrLTot{ii,jj};
        end
    end
    DCal2DCrLTot = MATconv;
end
% Apro file di testo
fileID = fopen(FileName,'a');
fmt = '%s \r';

text = 'NuovaConversione function worked correctly';
fprintf(fileID,fmt,text);

fclose(fileID);

end