function strB = printBlockBStr(materials)

templB = readTemplate('b');

nMaterials = size(materials.values,1);
nLayers = 1;
nPars = size(materials.values,2);

if nPars==5
    
    % thr ths tha thm Alfa n Ks Kk thk 
    % thr ths Alfa n Ks

    map = [1,1;...
           2,2;...
           3,1;...
           4,2;...
           5,3;...
           6,4;...
           7,5;...
           8,5;...
           9,2];
    
    TMP = materials;
    materials.captions={};
    materials.values=repmat(NaN,[nMaterials,9]);
    for iPar=1:9
        materials.captions{1,map(iPar,1)}=TMP.captions{1,map(iPar,2)};
        for iMaterial=1:nMaterials
            materials.values(iMaterial,map(iPar,1))=TMP.values(iMaterial,map(iPar,2));
        end
    end 
    nPars = size(materials.values,2); 
    clear TMP
end
    
    
materialsCaptionsStr = '';
for iPar = 1:nPars
    materialsCaptionsStr = [materialsCaptionsStr,sprintf('%s ',materials.captions{iPar})];
end

formatStr = [repmat([repmat('%f ',[1,nPars]),'\n'],[1,nMaterials-1]),[repmat('%f ',[1,nPars])]];

materialsValuesStr = sprintf(formatStr,materials.values');

strB = sprintf(templB,nMaterials,nLayers,nPars,materialsCaptionsStr,materialsValuesStr);