Tabla in one column to two column in report MATLAB

2 visualizaciones (últimos 30 días)
Jandry Raphael Camacho Moncayo
Jandry Raphael Camacho Moncayo el 8 de Sept. de 2021
I would like the image on the right to be the same in the MATLAB report, that in one column two columns can be placed
%Reporte
import mlreportgen.report.*
import mlreportgen.dom.*
import mlreportgen.ppt.*
rpt_name = strcat('Reporte Detallado - Tramo');
rpt = Report(rpt_name,'pdf');
%rpt = Report(' Reporte Final', 'pdf');
%Portada
Tstyle={HAlign('center'),Bold(1),FontFamily('Gotham'),...
FontSize('20pt'),Color('Black'),...
OuterMargin('0in','0in','.5in','.5in'),...
HAlign('center')};
titlepg = TitlePage();
title1 = Paragraph('UNIVERSIDAD TÉCNICA PARTICULAR DE LOJA');
title1.Style=Tstyle;
titlepg.Title = title1;
a=Paragraph('SISTEMA INTEGRAL DE LA VALORACIÓN VIAL (SILVVIA)');
a.Style=Tstyle;
titlepg.Subtitle = a;
a1=Paragraph('Reporte Detallado');
a1.Style=Tstyle;
titlepg.Author = a1;
add(rpt,titlepg)
%Tabla de contenidos
add(rpt,TableOfContents);
%Capítulos
%Capítulo 1
chap1 = Chapter;
chap1.Title ='Descargo de responsabilidad';
p=Paragraph('El software SILVVIA y su documentación es propiedad intelectual de la Universidad Técnica Particular de Loja (UTPL). SILVVIA fue desarrollado para estimar el nivel de seguridad que ofrece las carreteras rurales utilizando el método iRAP. El usuario comprende los supuestos de la metodología utilizada en el software. La interpretación de los resultados de SILVVIA son de exclusiva responsabilidad del usuario. En ningún caso la UTPL será responsable por daños directos, indirectos, especiales, incidentales o consecuentes que surjan a partir del uso del programa y/o documentación asociada. El usuario comprende que SILVVIA es un software para fines educativos e informativos, los fines comerciales sin el permiso por escrito de los titulares de los derechos de autor está prohibida. Si no está satisfecho con alguna parte del software SILVVIA o con alguno de estos términos de uso, su único y exclusivo recurso es dejar de usar el programa.');
p.FontFamilyName='Gotham';
p.HAlign='justify';
add(chap1,p);
%Estilo de tabla establecido
tableStyle = { ...
Width('100%'), ...
Border('solid','black','1px'), ...
ColSep('solid','black','1px'), ...
FontFamily('Gotham'),...
Hyphenation(false),...
RowSep('solid','black','1px') ...
};
%Ancho de las tablas
grps(1) = TableColSpecGroup;
grps(1).Span = 4;
specs(1) = TableColSpec;
specs(1).Span = 1;
specs(1).Style = {Width("40%"),HAlign('left')};
specs(2) = TableColSpec;
specs(2).Span = 2;
specs(2).Style = {Width("20%"),HAlign('center')};
specs(3) = TableColSpec;
specs(3).Span = 3;
specs(3).Style = {Width("20%"),HAlign('center')};
specs(4) = TableColSpec;
specs(4).Span = 4;
specs(4).Style = {Width("20%"),HAlign('center')};
grps(1).ColSpecs = specs;
%Estilo establecido para los encabezados de las tablas
HeaderStyle = {Bold(),BackgroundColor('lightgray'),FontSize('10pt'),FontFamily('Gotham')};
%Estilo establecido para el cuerpo de la tabla
BodyStyle={BackgroundColor('paleturquoise'),Color('black'),FontSize('10pt'),FontFamily('Gotham'),HAlign('left')};
Atributos = {'Ancho (≥ 3.25 m)'; 'Medio (≥ 2.75 m a < 3.25 m)'; 'Estrecho (≥ 0 m a < 2.75 m)'};
Ocupante = [1;2;3];
Motociclista = [1;2;3];
Ciclista = [1;2;3];
Peaton = [1;2;3];
E=Ocupante;
F=Motociclista;
G=Ciclista;
H=Peaton;
T=table(categorical(Atributos),f(E),f(F),f(G),f(H));
T.Properties.VariableNames = {'Atributo';'Ocupante del vehículo ';'Motociclista';'Ciclista';'Peatón'};
Tablax=FormalTable(T);
Tablax.TableEntriesHAlign = 'center';
Tablax.Style = tableStyle;
Tablax.Header.Children(1).Style =HeaderStyle;
Tablax.Body.Style=BodyStyle;
add(chap1,Tablax);
add(chap1,Paragraph(''))
add(rpt,chap1);
%Paso Final
close(rpt);
rptview(rpt);

Respuestas (0)

Categorías

Más información sobre MATLAB Report Generator Task Examples en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by