ingUACj1=[1 2 3];
ingUACj2=[1 2 3];
ingUACj3=[1 2 3];
dUAC1 = sort(repmat(ingUACj2,1,length(ingUACj3)));
ingUACc1 = repmat(dUAC1,1,length(ingUACj1));
sUAC1 = repmat(ingUACj3,1,length(ingUACj2));
ingUACc2 = repmat(sUAC1,1,length(ingUACj1));
dUACr1 = sort(repmat(ingUACj2,1,length(ingUACj3)));
ingUACc3 = sort(repmat(ingUACj1,1,length(dUACr1)));
% Convierto a texto
iiUAC=cellfun(@num2str, num2cell(ingUACc3),'UniformOutput',false);
wwUAC=cellfun(@num2str, num2cell(ingUACc1),'UniformOutput',false);
zzUAC=cellfun(@num2str, num2cell(ingUACc2),'UniformOutput',false);
% Se concatenan
pruebaf1= cellfun(@(x,y,t) strcat(x,'.',y,'.',t),iiUAC,zzUAC,wwUAC,'UniformOutput',false)';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pp=[0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.000274520277048093 0.000274520277048093 0.000274520277048093 0.000274520277048093 0.000274520277048093;
0.000651149243699069 0.000651149243699069 0.000651149243699069 0.000651149243699069 0.000651149243699069;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.000376628966650976 0.000376628966650976 0.000376628966650976 0.000376628966650976 0.000376628966650976;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.000274520277048093 0.000274520277048093 0.000274520277048093 0.000274520277048093 0.000274520277048093;
0.000651149243699069 0.000651149243699069 0.000651149243699069 0.000651149243699069 0.000651149243699069;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.000376628966650976 0.000376628966650976 0.000376628966650976 0.000376628966650976 0.000376628966650976;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.000274520277048093 0.000274520277048093 0.000274520277048093 0.000274520277048093 0.000274520277048093;
0.000651149243699069 0.000651149243699069 0.000651149243699069 0.000651149243699069 0.000651149243699069;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.000376628966650976 0.000376628966650976 0.000376628966650976 0.000376628966650976 0.000376628966650976;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000;
0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000 0.100000000000000];
%%%%columnas T
T=[1 2 3 4 5]';
iUAC1=T';
iUAC1=num2cell(T');
iUAC2=pp;
iUAC2=num2cell(pp);
iUAC121 = vertcat(iUAC1,iUAC2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% CONCATENA LA PRIMERA COLUMNA
AAUACj=NaN;
AAUACj1=pruebaf1;
AAUACj3 = vertcat(AAUACj,AAUACj1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% CREA LA TABLA
prueba1=[AAUACj3 iUAC121];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% CAMBIA EL NaN POR []
for ii = 1:length(prueba1)
if isnan(prueba1{ii})
prueba1{ii} = [];
end
end
%%%%%%%%%%%%%%%%%%%%%% creación prueba.INC
mm=cell2mat(cellfun(@length,cellfun(@num2str,prueba1,'UniformOutput',false),'UniformOutput',false));
nn=repmat(max(mm),size(mm,1),1)+1-mm;
fid = fopen('prueba.inc','wt');
for i=1:size(prueba1,1)
for j=1:size(prueba1,2)
fprintf(fid,[num2str(prueba1{i,j}), repmat(' ',1,nn(i,j)),'\t']);
end
fprintf(fid,'\n');
end
fclose(fid);