Effacer les filtres
Effacer les filtres

Publish: how to change the index of the document generated from the code?

1 vue (au cours des 30 derniers jours)
Ricardo
Ricardo le 27 Jan 2016
I would like to generate a report with the Matlab publish tool, but I cannot find a way to generate the table of contents with code.
In my case I have a loop and I would like each iteration to be a point in the index, like it is done with the Sections in the code.
In order to have an index like this:
  • Data processing
  • Case 1
  • Case 2
  • ...
Being each case the result of an analysis done on each iteration of a loop:
%%Data processing
for ii = 1:3
%%Case ii
function_that_processes_data_and_plots_results(ii);
end
Is it possible to do it?
Thanks!

Réponses (1)

Daniel Armyr
Daniel Armyr le 3 Fév 2016
I think that what you want to do is not possible. The publish function does not handle dynamic code in the layout. For that you need the MATLAB Report Generator which is a for-purchase add-on.
If you are good enough at programming, you could work around that, though. Rather than having a loop in the script you publish, you could write a pre-processing script that generates the publishable code with all the correct headings. Then you publish that file.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by