Borrar filtros
Borrar filtros

How can you programmatically save a comparison, created through the use of slxmlcomp.compare(), to an HTML file without the use of the Matlab GUI.

7 visualizaciones (últimos 30 días)
I'm currently trying to create an automated script to compare two model files. To compare the two model files I'm using the slxmlcomp.compare(modelname_A, modelname_B) function. When I do this Matlab opens up a comparison window that lists the contents of both model files. On that opened 'model_A vs model_B' window, I can click the 'Save As' button and save the comparison as an HTML file. I would like to know how to achieve this save functionality purely through Matlab script.

Respuestas (1)

Anish Mitra
Anish Mitra el 18 de Abr. de 2016
Hi,
Try using it with an output argument (in R2016a) :
>> Edits = slxmlcomp.compare(modelname_A,modelname_B);
This then saves the results in an Edits object, and does not open up the comparison window.
Hope this helps,
Anish
  3 comentarios
Marius Grigore
Marius Grigore el 8 de En. de 2020
htmlString = slxmlcomp.internal.report.compareAndGenerateReport(model1, model2, 'html');
fh = fopen('report.html', 'w');
fprintf(fh, '%s', htmlString);
fclose(fh);
web('report.html');

Iniciar sesión para comentar.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by