How to update Title and Subtitles each time in a loop for publishing document
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I want to publish the documentation. I am going to do several test on one file and want to publish all of them in one document. I dont want to publish the code into documentation, so i changed the settings. Here my code goes...
%% Title
% Content of the Title
%% Tests To be run
% Detail of the text going to be run
warning off;
for i = 1:10
TC_i = ['TestCase' num2str(i)];
fprintf('%% TestCase %d\n\n',i); // This has to publish Title as each time
%Inputs //1st subheading
x_input = 5*i; %Hz
fprintf('Input A is %d Hz \n',x_input);
y_input = 0.1*i; % pu
fprintf('Input B is %d pu \n\n',y_input);
%Test Results // 2nd subheading
imshow('TC.jpg');
snapnow;
%Result // 3rd subheading
fprintf('Test Result is %s \n\m', 'Pass');
end
So, the problem is Test1,Test2,Test3.....are the titles has to be updated each time as heading (similar to '%%') and Inputs,Test Results & Result has to be updated each time as subheadings (1.1,2.1,3.1..... or just as subheadings)...Actually, images and results are also updated each time as incremented by 'i' value.
// used in above code is to show the requirements only
0 comentarios
Respuestas (1)
David Sanchez
el 19 de Sept. de 2013
For now, Matlab does not support adding changing titles iterating. You can not change the title on every iteration. Your line
fprintf('%%TestCase %d\n\n',i);
will appear in you publish doc as a comment instead of as a title.
Ver también
Categorías
Más información sobre Results, Reporting, and Test File Management en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!